environmentVariables
The environmentVariables reserved property contains values that should be exported as environment variables. For example, esc run exports each key-value pair in the environmentVariables property as an environment variable that is accessible to the command to run.
This property is also used by Pulumi policy packs. When an ESC environment is attached to a policy pack in a policy group, environmentVariables are injected into the policy runtime as environment variables.
Properties
| Property | Type | Description |
|---|---|---|
| name | string | The value of the environment variable name |
Example
values:
environmentVariables:
GREETING: Hello
Evaluated result
{
"environmentVariables": {
"GREETING": "Hello"
}
}
Using esc run
$ esc run default/greet -- sh -c '${GREETING}, ${USER}!'
Hello, user!
Thank you for your feedback!
If you have a question about how to use Pulumi, reach out in Community Slack.
Open an issue on GitHub to report a problem or suggest an improvement.