Atmos
infrastructure.atmos
Protects against destructive Atmos operations like terraform deploy (auto-approve), destroy, clean, state rm/taint, and helmfile destroy
- 11blocking rules
- 6safe patterns
- 2Critical
- 7High
- 2Medium
[packs]
enabled = ["infrastructure.atmos"]Evaluated when a command contains atmos.
Blocking rules
Each rule ID is infrastructure.atmos:<name>. Use it in allowlists and [policy.rules].
Criticalatmos-destroyatmos terraform destroy removes ALL managed infrastructure for the component/stack.
Explanation
atmos terraform destroy removes managed infrastructure: - Every resource in the component's state is destroyed - --affected / --all destroy across MANY components at once - Cannot be undone without backups/recreation Preview first: atmos terraform plan -destroy <component> -s <stack>
Criticalatmos-helmfile-destroyatmos helmfile destroy removes Helm releases from the cluster.
Explanation
atmos helmfile destroy tears down Helm releases: - Deletes the component's Helm releases from the cluster - Workloads, services, and their data may be removed - Cannot be undone without redeploying Inspect first: atmos helmfile diff <component> -s <stack>
Highatmos-apply-auto-approveatmos terraform apply -auto-approve skips confirmation. Remove -auto-approve for safety.
Explanation
atmos terraform apply -auto-approve skips confirmation: - No opportunity to review the plan before applying - Intended for CI/CD, not interactive use - Changes may destroy or recreate resources For safety: drop -auto-approve and review the plan
Highatmos-cleanatmos terraform clean deletes local Terraform state and generated files (.terraform/, varfiles, backend config; --everything also removes terraform.tfstate*).
Explanation
atmos terraform clean removes local Terraform working files: - Deletes .terraform/, generated varfiles, and backend config - --everything also removes local state (terraform.tfstate*) - --force skips the confirmation prompt - Back up any local-only state before running Inspect what would be removed before using --everything --force
Highatmos-deployatmos terraform deploy runs apply with -auto-approve (no confirmation). Preview with 'atmos terraform plan' first.
Explanation
atmos terraform deploy auto-approves an apply: - Atmos rewrites 'deploy' to 'apply' and injects -auto-approve - Changes are applied immediately, with no confirmation prompt - May destroy or recreate resources Preview first: atmos terraform plan <component> -s <stack>
Highatmos-force-unlockatmos terraform force-unlock removes a state lock. Only use if the lock is stale.
Explanation
atmos terraform force-unlock removes a state lock: - May corrupt state if another operation is in progress - Only use when you are sure no other run is active Verify no other operations: CI/CD pipelines, other operators
Highatmos-state-mvatmos terraform state mv moves resources in state. Incorrect moves can cause resource recreation.
Explanation
atmos terraform state mv rewrites resource addresses: - A wrong move can cause destruction/recreation - Does not affect the actual cloud resources Preview the move and back up state first
Highatmos-state-rmatmos terraform state rm removes a resource from state without destroying it. Resource becomes unmanaged.
Explanation
atmos terraform state rm orphans a resource: - Removed from Terraform state, but the cloud resource remains - The resource becomes unmanaged (Terraform ignores it) - May cause drift between state and reality Back up state first (atmos terraform state pull)
Highatmos-taintatmos terraform taint marks a resource to be destroyed and recreated on next apply.
Explanation
atmos terraform taint marks a resource for recreation: - The resource is destroyed and recreated on next apply/deploy - May cause downtime; identifiers/IPs may change Prefer -replace in plan/apply (Terraform 0.15.2+)
Mediumatmos-plan-destroyatmos terraform plan -destroy previews destruction. Review carefully before deploying.
Explanation
atmos terraform plan -destroy shows a destruction preview: - Read-only (safe to run), but shows what WOULD be destroyed - Review the output carefully before applying/deploying This is the safe way to preview a destroy.
Mediumatmos-workspace-deleteatmos terraform workspace delete removes a workspace and its state.
Explanation
atmos terraform workspace delete removes a workspace: - The workspace and its state file are deleted - Does NOT destroy actual infrastructure (resources orphaned) Destroy resources first, then delete the workspace
Safe patterns
Checked first. A command that matches one is never blocked by this pack.
atmos-terraform-planatmos-terraform-applyatmos-terraform-outputatmos-terraform-validateatmos-describeatmos-helmfile-diff