Destroy all managed infrastructure
high risk
terraform plan -destroy -out=destroy.tfplanReview the destroy planterraform workspace showConfirm the environmentterraform destroy -target=<resource>Narrow the blast radiusPlans and removes all resources managed by the current configuration/workspace.
| Flag | Meaning |
|---|---|
-target | -target⚠ Limit to specific resources |
-auto-approve | -auto-approve⚠ Skip confirmation |
plan -destroy | Preview what would be destroyed |
terraform plan -destroyPreview · explain & risk-check →terraform destroy -target=aws_instance.testDestroy one resource · explain & risk-check →Reference text is hand-written and may be incomplete — check man terraform for your version. Test destructive commands on a non-production system first.