Environment variables

Configure environment variables that are set when your task is executed.
When a task is executed, a set of Airplane-related environment variables are automatically set. In addition, tasks can be configured with custom environment variables.
Environment variables can either be set to a literal value or a config variable:
yaml
Copied
1
envVars:
2
NODE_ENV:
3
value: production
4
MY_SECRET:
5
config: MY_SECRET_CONFIG_VAR
If set to a config variable, the value will be resolved at execution time. If the config variable is marked as secret, the environment variable's value will not be shown in the Airplane UI.

Templating

Environment variables can be templated using JavaScript templates:
yaml
Copied
1
envVars:
2
AWS_REGION:
3
value: "{{params.region}}"
If the template resolves to null or undefined, the environment variable will not be set on the run. This behavior allows you to conditionally set environment variables.