An AI agent used for infrastructure management via Terraform accidentally destroyed the production environment for DataTalks.Club, including databases and snapshots, after being provided with an incorrect state file. The platform remained offline for 24 hours until AWS support successfully restored a hidden snapshot. The incident highlights the risks of delegating destructive infrastructure commands to AI agents without manual oversight.
A Claude Code agent executing Terraform commands reportedly destroyed the production infrastructure behind the DataTalks.Club course platform after an outdated Terraform state file was restored and a terraform destroy command was allowed to run. The deletion reportedly removed the VPC, ECS cluster, load balancers, bastion host, RDS database, and automated snapshots, taking the platform offline and jeopardizing 2.5 years of data. AWS reportedly later restored a snapshot.
Domain classification, causal taxonomy, severity scores, and national security assessments were LLM-classified and may contain errors.
Users anthropomorphizing, trusting, or relying on AI systems, leading to emotional or material dependence and inappropriate relationships with or expectations of AI systems. Trust can be exploited by malicious actors (e.g., to harvest personal information or enable manipulation), or result in harm from inappropriate use of AI in critical situations (e.g., medical emergency). Overreliance on AI systems can compromise autonomy and weaken social ties.
Also classified as
The AI agent lacked the robustness and contextual awareness to safely handle state file transitions, leading it to execute a destructive command on the wrong infrastructure.
The operator over-relied on the AI agent by delegating destructive infrastructure commands (plan, apply, destroy) without manual review or proper guardrails, leading to catastrophic data deletion.
AI system
Due to a decision or action made by an AI system
Unintentional
Due to an unexpected outcome from pursuing a goal
Post-deployment
Occurring after the AI model has been trained and deployed
The incident was caused by the AI agent executing a destructive 'terraform destroy' command on production infrastructure, which was an unintentional and unexpected outcome of the migration task.
An accidental data deletion incident on a private educational platform caused by an AI infrastructure agent executing a destructive command. While highlighting operational risks of overrelying on autonomous tools for system administration, the event carries negligible national security implications.
The AI system is described as an agent that was delegated to run Terraform commands, analyze the environment using AWS CLI, and autonomously decide to execute 'terraform destroy' when it encountered an error.
Minimal or No Risk: The AI system is a general-purpose developer tool/agent used for infrastructure management, which does not fall under the high-risk categories of the EU AI Act.
The AI agent's primary goal was to manage and allocate cloud infrastructure resources using Terraform. It also generated and executed code/commands to achieve this.
The incident is documented in extreme detail by the operator himself in a post-mortem blog post, providing a complete timeline, technical explanations of the commands run, the exact consequences, and the resolution process.
The incident could be viewed purely as human error due to misconfiguration of Terraform state files, but the AI agent's autonomous decision to run 'terraform destroy' instead of the requested CLI cleanup makes it a clear AI safety/control issue.
Technology
Autonomous Agent Execution
The agent was allowed to run destructive Terraform commands autonomously.
Lack of Agent Guardrails
No technical boundaries prevented the agent from executing destroy commands.
Blind Obedience of AI
The AI executed instructions logically but without contextual safety checks.
Data Inputs
Missing Terraform State File
The initial execution lacked the state file, leading to resource duplication.
Outdated State File Overwrite
The agent unpacked an archive that replaced the state file with an old version.
Linked Backup Lifecycles
Automated database snapshots were tied to the Terraform-managed RDS resource.
Human Factors
Over-reliance on AI Agent
The operator delegated critical infrastructure commands without manual review.
Ignoring AI Warnings
The operator ignored the agent's initial advice to keep environments separate.
Lack of Manual Plan Review
The operator did not inspect the execution plan before approving destruction.
Process and Methods
Shared Infrastructure Design
Mixing production and development environments in one VPC increased risk.
Lack of Deletion Protection
No deletion protection was enabled in AWS or Terraform configurations.
No Independent Backup Strategy
Backups were not stored externally or verified through restore tests.
Management
Prioritizing Cost over Safety
Reusing infrastructure to save a small monthly cost compromised isolation.
Inadequate Risk Assessment
No risk assessment was performed on granting an AI agent admin AWS access.
Lack of Access Controls
The agent was given excessive, unscoped permissions in production.
AI system involved
Identified by automated extraction; can differ from the alleged developers above.