Jonathan Rose
08/13/2025, 12:46 PMconfig:
plan: &plan
- command: terraform generate planfile transit-gateway -f "{{ /atmos/tenable/{{ .vars.stage }}-transit-gateway.tfplan.json }}"
- command: terraform generate planfile tgw-routing -f "{{ /atmos/tenable/{{ .vars.stage }}-tgw-routing.tfplan.json }}"
workflows:
plan-ue1:
description: |
The steps in this workflow are run when a pull request is opened or updated.
This workflow will plan the component with mock outputs for dependencies.
It will not apply any changes.
stack: cfsb-it-network-ue1
steps: *plan
The goal is to leverage existing variables when noting the location of the planfile. Here is the error I am getting:
The following command failed to execute:
atmos terraform generate planfile transit-gateway -f "{{ /atmos/tenable/{{ .vars.stage }}-transit-gateway.tfplan.json }}" -s cfsb-it-network-ue1
To resume the workflow from this step, run:
atmos workflow plan-ue1 -f run --from-step step1 -s cfsb-it-network-ue1
Not sure if it's a spacing, templating, or some other issue altogether.Gabriela Campana (Cloud Posse)
08/13/2025, 6:20 PMAndriy Knysh (Cloud Posse)
08/13/2025, 6:55 PMAndriy Knysh (Cloud Posse)
08/13/2025, 6:55 PMAndriy Knysh (Cloud Posse)
08/13/2025, 6:56 PMAndriy Knysh (Cloud Posse)
08/13/2025, 6:56 PM{{ .vars.stage }} - the workflow will not have that var b/c it's related to some Atmos component in some stack, not to the workflowAndriy Knysh (Cloud Posse)
08/13/2025, 6:59 PMAndriy Knysh (Cloud Posse)
08/13/2025, 6:59 PMAndriy Knysh (Cloud Posse)
08/13/2025, 7:01 PMstage individually - not DRY, but will workJonathan Rose
08/14/2025, 7:59 AMJonathan Rose
08/14/2025, 8:00 AM--dir parameter to atmos terraform generate planfile so it places the resulting file in the desired directory and atmos controls what the name isJonathan Rose
08/14/2025, 8:00 AM--file and --dir together and, in fact, raise an exception if you doAndriy Knysh (Cloud Posse)
08/14/2025, 1:36 PMatmos terraform generate planfiles command (to generate planfiles for all components in all stacks in one go)Andriy Knysh (Cloud Posse)
08/14/2025, 1:37 PMAndriy Knysh (Cloud Posse)
08/14/2025, 1:37 PM--file-template (required)
Varfile template (path, file name, and file extension). Supports absolute and relative paths. Supports context tokens: {namespace}, {tenant}, {environment}, {region}, {stage}, {base-component}, {component}, {component-path}. All subdirectories in the path will be created automatically.Andriy Knysh (Cloud Posse)
08/14/2025, 1:38 PMatmos terraform generate planfiles as wellAndriy Knysh (Cloud Posse)
08/14/2025, 1:41 PM--dir flag can be added to atmos terraform generate planfileJonathan Rose
08/14/2025, 1:50 PM--dir to atmos terraform generate planfile to that each component's planfile is put into a desired directory.Jonathan Rose
08/15/2025, 7:48 AM