github cloudposse/atmos v1.4.3

latest releases: v1.88.1, v1, v1.88.0...
2 years ago

what

  • Add --dry-run command-line flag to all commands and workflows

why

  • Helps debugging atmos commands and workflows
  • The --dry-run flag shows all the flow and commands without executing them and without writing files to the file system (e.g. varfiles and backend config are not written)
  • The --dry-run flag shows all the workflow steps without executing them

tests and examples

Click to expand
atmos terraform plan test/test-component-override -s=tenant1-ue2-dev --dry-run

Variables for the component 'test/test-component-override' in the stack 'tenant1/ue2/dev':

enabled: true
environment: ue2
namespace: eg
region: us-east-2
service_1_list:
- 1
- 2
- 3
service_1_map:
  a: 1
  b: 2
  c: 3
service_1_name: service-1-override-2
service_2_list:
- 1
- 2
- 3
service_2_map:
  a: 1
  b: 2
  c: 3
service_2_name: service-2-override
stage: dev
tenant: tenant1

Writing the variables to file:
examples/complete/components/terraform/test/test-component/tenant1-ue2-dev-test-test-component-override.terraform.tfvars.json

Executing command:
/usr/local/bin/terraform init -reconfigure

Command info:
Terraform binary: /usr/local/bin/terraform
Terraform command: plan
Arguments and flags: []
Component: test/test-component-override
Terraform component: test/test-component
Inheritance: test/test-component-override -> test/test-component
Stack: tenant1-ue2-dev
Stack path: examples/complete/stacks/tenant1/ue2/dev
Working dir: examples/complete/components/terraform/test/test-component

Using ENV vars:
TEST_ENV_VAR2=val2
TEST_ENV_VAR3=val3-override
TEST_ENV_VAR4=val4
TEST_ENV_VAR1=val1-override

Executing command:
/usr/local/bin/terraform workspace select test-component-override-workspace-override

Executing command:
/usr/local/bin/terraform plan -var-file tenant1-ue2-dev-test-test-component-override.terraform.tfvars.json -out tenant1-ue2-dev-test-test-component-override.planfile
atmos workflow terraform-plan-test-component-override-2-all-stacks -f workflow1 --dry-run

Executing the workflow 'terraform-plan-test-component-override-2-all-stacks' from 'examples/complete/workflows/workflow1.yaml'

description: Run 'terraform plan' on 'test/test-component-override-2' component in
  all stacks
steps:
- command: terraform plan test/test-component-override-2 -s tenant1-ue2-dev
  stack: ""
  type: ""
- command: terraform plan test/test-component-override-2 -s tenant1-ue2-staging
  stack: ""
  type: ""
- command: terraform plan test/test-component-override-2 -s tenant1-ue2-prod
  stack: ""
  type: ""
- command: terraform plan test/test-component-override-2 -s tenant2-ue2-dev
  stack: ""
  type: ""
- command: terraform plan test/test-component-override-2 -s tenant2-ue2-staging
  stack: ""
  type: ""
- command: terraform plan test/test-component-override-2 -s tenant2-ue2-prod
  stack: ""
  type: ""
stack: ""

Executing workflow step: terraform plan test/test-component-override-2 -s tenant1-ue2-dev

Executing command:
atmos terraform plan test/test-component-override-2 -s tenant1-ue2-dev

Executing workflow step: terraform plan test/test-component-override-2 -s tenant1-ue2-staging

Executing command:
atmos terraform plan test/test-component-override-2 -s tenant1-ue2-staging

Executing workflow step: terraform plan test/test-component-override-2 -s tenant1-ue2-prod

Executing command:
atmos terraform plan test/test-component-override-2 -s tenant1-ue2-prod

Executing workflow step: terraform plan test/test-component-override-2 -s tenant2-ue2-dev

Executing command:
atmos terraform plan test/test-component-override-2 -s tenant2-ue2-dev

Executing workflow step: terraform plan test/test-component-override-2 -s tenant2-ue2-staging

Executing command:
atmos terraform plan test/test-component-override-2 -s tenant2-ue2-staging

Executing workflow step: terraform plan test/test-component-override-2 -s tenant2-ue2-prod

Executing command:
atmos terraform plan test/test-component-override-2 -s tenant2-ue2-prod

Don't miss a new atmos release

NewReleases is sending notifications on new releases.