github cloudposse/atmos v1.114.0

latest releases: v1.130.0, v1, v1.129.0...
16 days ago
Add `--everything` and `--force` flags to the `atmos terraform clean` command @haitham911 (#727)

What

  • Add --everything and --force flags to the atmos terraform clean command to delete the Terraform-related folders and files, including:
    • backend.tf.json
    • .terraform
    • terraform.tfstate.d
    • .terraform.lock.hcl

The following scenarios are covered:

  1. If no component is specified:
    atmos terraform clean --everything deletes all state files for all Terraform components and requires a confirmation from the user
    atmos terraform clean --everything --force deletes all state files for all Terraform components without a confirmation from the user

  2. If a specific component is specified:
    atmos terraform clean <component> --everything - deletes the state files for the specified component

  3. If both a component and a stack are specified:
    atmos terraform clean <component> --stack<stack> --everything - deletes the state files for the specified component and stack

Why

  • Cleaning state files is useful when running tests (it should not be the default behavior to avoid unintended data loss)

Usage

atmos terraform clean <component> -s <stack> [--skip-lock-file] [--everything] [--force]

Don't miss a new atmos release

NewReleases is sending notifications on new releases.