env
The step-level env field adds or overrides environment variables for a single step, taking precedence over the workflow-level env.
steps:
- command: terraform apply vpc -s plat-ue2-dev --auto-approve
env:
AWS_REGION: us-east-2
Step env overrides workflow-level env for matching keys. The values apply only to that step's subprocess.
Atmos renders the values you declare in env as templates. The environment Atmos inherits from your shell is never rendered: it reaches the step's processes unchanged, so a variable that contains {{ neither fails the step nor changes value. Write a declared value with !literal to keep it unrendered as well.
This field is different from type: env, which stores variables for subsequent workflow steps using a vars map:
steps:
- name: set_env
type: env
vars:
DEPLOY_ENV: prod