Skip to content

v1.185.0

Compare
Choose a tag to compare
@cloudposse-releaser cloudposse-releaser released this 04 Aug 20:27
· 4 commits to main since this release
9625442
Update `atmos terraform plan` command, add `--skip-planfile` flag @aknysh (#1385) ## what
  • Update atmos terraform plan command
  • Add --skip-planfile flag to atmos terraform plan command
  • Add ATMOS_COMPONENTS_TERRAFORM_PLAN_SKIP_PLANFILE ENV variable
  • Add components.terraform.plan.skip_planfile section to atmos.yaml
  • Update docs
  • Add tests

why

  • Support Terraform Cloud

  • Allow skipping writing the plan to a file by not passing the -out flag to Terraform when executing the atmos terraform plan command. Set the flag to true when using Terraform Cloud since the -out flag is not supported. Terraform Cloud automatically stores plans in its backend"

  • Allow controlling the behavior in three ways:

    • Globally by setting components.terraform.plan.skip_planfile to true in atmos.yaml

      components:
        terraform:
          auto_generate_backend_file: true
          plan:
            # Skip passing the `-out=FILENAME` flag when executing the `terraform plan` command.
            # Set it to `true` when using Terraform Cloud since the `-out` flag is not supported.
            # Terraform Cloud automatically stores plans in its backend.
            skip_planfile: true
    • Via the ATMOS_COMPONENTS_TERRAFORM_PLAN_SKIP_PLANFILE ENV variable

        ATMOS_COMPONENTS_TERRAFORM_PLAN_SKIP_PLANFILE=true atmos terraform plan <component> -s <stack>
    • By passing the --skip-planfile=true flag on the command line

       atmos terraform plan <component> -s <stack> --skip-planfile=true