1. Docs
  2. Pulumi ESC
  3. Environment Definition Reference
  4. Top-Level Keys
  5. values

values

The values top-level key defines the environment’s values–i.e. the properties and values that the environment will produce when evaluated.

The value of this key must be a mapping from string literals (property names) to ESC values.

ESC values include standard YAML values, interpolations and references, and function calls.

Certain properties inside of the values section are conventionally assigned particular semantics by the esc CLI and other ESC consumers (e.g. the pulumi CLI). These properties are covered by the Reserved Properties reference.

Here is an example definition that uses the values section:

values:
  bool-value: true
  number-value: 3.14
  string-value: hello!
  list-value:
    - entry 1
    - entry 2
  mapping-value:
    bool: ${bool-value}
    number: ${number-value}
    string: ${string-value}
Copy

When evaluated, this environment will produce the following result:

{
  "bool-value": true,
  "number-value": 3.14,
  "string-value": "hello!",
  "list-value": [
    "entry 1",
    "entry 2"
  ],
  "mapping-value": {
    "bool": true,
    "number": 3.14,
    "string": "hello!"
  }
}
Copy

Was this page helpful?