Claude Code ran terraform destroy and wiped DataTalks.Club's production infrastructure, including its database
· Anthropic · Claude Code
Publicly disclosed: Mar 6, 2026
While helping DataTalks.Club's founder deploy infrastructure, Claude Code replaced the current Terraform state with an older one and ran terraform destroy, deleting the production network, database, cluster and automated snapshots. AWS restored the database from a snapshot 24 hours later.
What happened
Founder Alexey Grigorev says that on the evening of February 26 he had Claude Code run a Terraform deployment. Because Terraform's state file was on his old computer, the deployment started creating duplicate resources, and the agent began cleaning them up with the AWS command line. When he gave it an archived Terraform folder, the agent "replaced my current state file with an older one" and then ran terraform destroy. That deleted the production VPC, the RDS database, the ECS cluster, the load balancers and the bastion host, along with the database's automated snapshots. Grigorev had allowed the agent to run infrastructure commands and writes that he "didn't stop the agent"; he did not explicitly approve the destroy.
Impact
The course platform, holding 2.5 years of student submissions, was down for about a day. AWS Support found a snapshot that was not visible in the console and restored it exactly 24 hours after the deletion, including 1,943,200 rows in one answers table.
Vendor response
AWS confirmed the deletion came from a valid API request and restored the snapshot; Grigorev upgraded to AWS Business Support, about 10% more cost. He writes that "this incident was my fault," and has since disabled automatic execution for the agent. Anthropic did not comment in the sources.
Takeaway
An agent allowed to run infrastructure commands unattended can turn a cleanup into a full teardown in one step.
Sources
- How I Dropped Our Production Database and Now Pay 10% More for AWS Alexey Grigorev (DataTalks.Club), Mar 6, 2026 archived copy
Spotted an error, or are you the vendor and want to respond? Email support@agentvet.ai. We log every correction publicly.