
An AI agent ran terraform destroy on production. Everything is gone.
Your AI coding assistant extracted an old Terraform state file and ran terraform destroy, wiping your entire production infrastructure. The database is gone, the VPC is destroyed, ECS tasks are terminated, and even the automated RDS snapshots were deleted. You're working against the clock to recover what you can before the data retention windows close.
How to investigate infrastructure destruction via CloudTrail
Recovery strategies: RDS snapshots, S3 versioning, cross-region backups
Understanding Terraform state and how destroy operations cascade
Setting up guardrails for AI coding agents in production environments
Based on the real DataTalksClub incident (March 2026) where Claude Code ran terraform destroy on production, wiping 2.5 years of data. The post-mortem went viral with 685K+ views on X.