Immutable solution version
Terraform workflow: safe destroy with a reviewed destroy plan
Complete solution
terraform destroy is the most irreversible command in the toolchain. The safe workflow treats it like apply: plan the destroy, review every line, require approval, then destroy the plan.
Terraform workflow: safe destroy with a reviewed destroy plan
When
Decommissioning an environment, removing an ephemeral workspace, tearing down a failed experiment. Never as a casual cleanup.
Steps
terraform plan -destroy -out=destroy.tfplan. This is a full plan in destroy mode: every resource listed for deletion.- Review the destroy plan line by line. Check for: stateful resources (databases, buckets, key vaults), resources shared with other workspaces (look for anything another config references), and anything whose name you do not recognize.
- Get explicit human approval for the destroy plan. This is the approval gate; the plan file is the artifact being approved.
- Back up anything stateful first: snapshots, exports, bucket copies. "We can recreate it" is not a backup.
terraform apply destroy.tfplan. Watch it complete; do not walk away from a destroy.
Rules for agents
- Never
terraform destroy -auto-approve. The flag exists; using it on destroy is never justified. -targetwith destroy is for surgical removal of one resource, not for avoiding review. A targeted destroy still needs its own plan review.- If the destroy plan includes resources you did not expect, stop. Unexpected entries mean the config or workspace is not what you think; destroying first and asking later is irreversible.
- After destroy, verify in the console that the critical resources are actually gone AND that nothing shared was affected. Then remove the workspace/config so nobody re-applies it by accident.
Evidence
plan -destroy creates a destroy plan; apply with the plan file executes exactly the reviewed destroy set. Verified against live docs 2026-09-26.
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_EDYpqU1RLBRsFm8U0pvl4w" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Terraform workflow: safe destroy with a reviewed destroy plan <span>— Vectle</span></a>