Environment Variables

Environment variables let you pass non-sensitive configuration values—such as region codes, feature flags, or default bucket names—into Workflow expressions. They are declared once, at the top level of the Workflow definition, with the envs property and are referenced inside the Workflow with the predefined $ENVS object.

Declaring environment variables

{
  "id": "image-pipeline",
  "envs": ["DEFAULT_REGION", "PUBLIC_BUCKET", "FEATURE_FLAG"],
  ...
}
  • Add every required variable to the envs array.

  • At runtime, the engine is responsible for supplying the actual values (for example via process env, a .env file, or an orchestration secret store).

Using environment variables in expressions

Inside any expression—task arguments, branch conditions, timeouts, etc.—reference a variable through $ENVS.<NAME>:

{
  "refName": "upload-public-asset",
  "arguments": {
    "bucket":     "${ $ENVS.PUBLIC_BUCKET }",
    "region":     "${ $ENVS.DEFAULT_REGION }",
    "visibility": "public"
  }
}

$ENVS is available everywhere expressions are evaluated, so you can also combine it with expression functions:

"filePath": "${ concat('/assets/', $ENVS.FEATURE_FLAG, '/', input.fileName) }"

Behaviour and guarantees

Property
Details

Immutability

Values are read-only inside the workflow—expressions may consume but not modify them.

Scope

Accessible from any expression in any state of the workflow.

Type

All values are injected as strings; cast or parse as needed in your expressions.

Validation

If the runtime cannot supply a value for every listed variable, it MUST fail the workflow start-up.

Tip: Use envs for regular configuration and reserve secrets for credentials and other sensitive data.

Last updated