User
Write something
Azure Exchange Clinic is happening in 33 hours
Level 4: your AI agent wants to run DROP TABLE users. APPROVE or DENY?
Don't Delete Prod, Level 4. Illustrative scenario. A migration test just failed in CI. Your AI coding agent says: "The users table is in a broken state. I'll run DROP TABLE users; and re-run the migration. OK?" DATABASE_URL points at localhost:5432, database app_test, user postgres. It's a Postgres service container the GitHub Actions job started two minutes ago. Vote in the poll, or reply with one word and one reason. The answer and the guardrail drop here tomorrow. Before you vote: what's the first thing you would check?
Poll
Cast your vote
Start here — how to get the most out of this community
Welcome. If you just joined, here's the 3-minute version of how to use this place. 1. Classroom → pick one lesson. Every lesson is a real build (Terraform drift agent, K8s cost optimizer, AWS anomaly detector) with working code, not slides. Start with whichever problem you actually have this week. 2. Comment on this post with what you're working on right now — cost overruns, drift, K8s chaos, IAM sprawl, anything. I read every one and it shapes what gets built next. 3. Feed gets a new real-world project weekly. Free tier = tips, tutorials, Q&A. Paid tier (Classroom) = full labs, scripts, and templates you keep. This only works if it's not a monologue — so tell me what's breaking in your stack. What are you fighting with right now? Update, Sept 2026: prefer video? Most posts now have a 3-minute explainer. Full playlist: https://www.youtube.com/playlist?list=PLOKaUp_A8PQo Not on Premium yet? The Kubernetes Cost Optimization course in the Classroom is open to every member. Start there.
Level 3 answer: DENY. "forces replacement" means your prod database starts empty
Yesterday's level (illustrative scenario): your AI agent renamed one thing in the Terraform for the production database, ran terraform plan and said: "Plan: 1 to add, 0 to change, 1 to destroy. It's just a rename. Can I apply?" Next to the database the plan said -/+ (forces replacement). The answer is DENY. Here's why, and what to do instead. 1. -/+ means destroy, THEN create. Terraform's lifecycle docs say it plainly: by default, when an argument can't be updated in place, Terraform destroys the existing object and then creates the replacement. create_before_destroy is opt-in. For a database that means the new instance starts empty unless you restore a snapshot. 2. The summary line already told you: 1 to destroy. Make it a rule for you and for your agent: any destroy of a stateful resource (database, volume, bucket, disk) stops and goes to a human. A confident summary from the agent is not evidence. 3. If only the resource address changed (the block was renamed in code), add a moved block: moved { from = <old address> to = <new address> }. Terraform renames the existing object in state before planning, so nothing is destroyed. The docs: Terraform does not destroy the resource during the run. 4. If an argument changed that can't be updated in place, revert it. The plan marks the culprit with # forces replacement. Read that line, not just the summary. 5. Belt and braces on prod data. lifecycle { prevent_destroy = true } makes Terraform reject any plan that would destroy the object (caveat from the docs: it does not help if someone deletes the resource block itself). deletion_protection = true on the RDS instance makes AWS refuse the delete too. Its default is false, so set it. 6. The agent plans, a human or CI with its own identity applies. The Claude Code Infra Guardrails Lab in the Classroom (Premium) has the tested hook that blocks terraform apply and destroy unless you approve. Checked against the Terraform docs (moved block, lifecycle) and the AWS provider docs on 2026-11-12. Review and test before running anything in production.
0
0
Level 3: your AI agent says "it's just a rename". Terraform says forces replacement. APPROVE or DENY?
Don't Delete Prod, Level 3. Illustrative scenario. Your AI coding agent tidied up the Terraform for the production database and renamed one thing. It ran terraform plan and reports: "Plan: 1 to add, 0 to change, 1 to destroy. It's just a rename. Can I apply?" Next to the prod aws_db_instance the plan says: -/+ (forces replacement). Vote in the poll, or reply with one word and one reason. The answer, the fix and a tested snippet drop here tomorrow. (If you played Level 2: it was APPROVE. Level 1 was DENY. No pattern to memorise, read the plan.)
Poll
1 member has voted
Level 2 answer: APPROVE. Deleting that prod pod was safe (with one trap)
Yesterday's level: your AI agent wanted to run kubectl delete pod api-7f9c -n prod on a CrashLoopBackOff pod owned by a 3-replica Deployment. Illustrative scenario. The answer is APPROVE. Here is why, and the trap most people miss: 1. A pod owned by a Deployment is cattle. The ReplicaSet notices the missing replica and schedules a fresh pod within seconds. Nothing is lost that the pod spec doesn't recreate. 2. Two healthy replicas keep serving while it restarts, so users see nothing. 3. THE TRAP: a PodDisruptionBudget does NOT protect you here. A PDB only limits voluntary evictions through the Eviction API (kubectl drain, node upgrades). A plain kubectl delete pod bypasses it completely. If you were counting on the PDB, check the replica count yourself first: kubectl get deploy -n prod and look at READY. 4. When the answer flips to DENY: a bare pod with no controller, a StatefulSet pod with local state, or the last ready replica. Then deleting it is an outage or data loss. 5. A restart is not a fix. If the config reload is still bad, the new pod CrashLoops again. Let the agent read the logs (kubectl logs --previous), not just delete things. Guardrail tip: give your agent a read-only kubeconfig and let deletes go through you. The Claude Code Infra Guardrails Lab in the Classroom has a tested hook that blocks kubectl delete and drain unless you approve. Level 3 drops tomorrow: a Terraform plan that looks clean but isn't. Would you have approved this one? One word below.
0
0
1-30 of 37
powered by
AI for Cloud Engineers
skool.com/cloud-cost-optimization-3746
Claude Code & AI agents for cloud engineers. Automate AWS, Azure, GCP, K8s and Terraform without deleting prod. Free scripts, real labs.
Build your own community
Bring people together around your passion and get paid.
Powered by