1. Docs
  2. Pulumi ESC
  3. Environment Definition Reference
  4. Reserved Properties
  5. environmentVariables

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.

Properties

PropertyTypeDescription
namestringThe value of the environment variable name

Example

values:
  environmentVariables:
    GREETING: Hello
Copy

Evaluated result

{
  "environmentVariables": {
    "GREETING": "Hello"
  }
}
Copy

Using esc run

$ esc run default/greet -- sh -c '${GREETING}, ${USER}!'
Hello, user!
Copy

Was this page helpful?