Live data from Hacker News

Claude Code wiped our production database with a Terraform command

twitter.com

41–50 of 167 posts

Re: Claude Code wiped our production database with a Terraform command

#41
post #16

An engineer recklessly ran untrusted code directly in a production environment. And then told on himself on Twitter.

From the article, it sounds like that engineer did a lot of other reckless things even before handing the tasks over to the AI agent to continue the recklessness with even more abandon.

This is a case study in "if you don't know what you're doing, the answer is not just to hand it over to some AI bot to do it for you."

The answer is to hire a professional. That is if you care about your data, or even just your reputation.

Re: Claude Code wiped our production database with a Terraform command

#42

Despite multiple comments blaming the AI agent, I think it's the backups that are the problem here, right? With backups, almost any destructive action can be rolled back, whether it's from a dumb robot, a mistaken junior, or a sleep-deprived senior. Without, you're sort of running the clock waiting for disaster.

Yes, backups are great but a 'dumb robot' or a 'mistaken junior' shouldn't have access to prod. And a sleep-deprived senior? Even then. They shouldn't have access to destructive effects on prod. Maybe the senior can get broader access in a time-limited scope if senior management temporarily escalates the developers access to address a pressing production issue, but at that point the person addressing the issue should…

But smart robots like Claude should and will have access to production. There has to be something figured out on how to make sure operation remains smooth. The argument of don't do that will not be a viable position to hold long term. Keeping a human in the loop is not necessary.

Re: Claude Code wiped our production database with a Terraform command

#44

Putting yourself in a situation where this could happen is kinda insane, right? Could be something I'm missing. I can't think of any specific example where I would let any agent touch a production environment, the least of which, data. AI aside, doing any major changes makes sense to do in a dev/staging/preview environment first. Not really sure what the lesson would be here. Don't punch yourself in the face repeated…

Why are you writing in this defensive manner? The post isn't an anti-AI screed, it's a "I screwed up, here's what I did and how to avoid it."

You say "Not really sure what the lesson would be here", but the entire contents of the blogpost is a lesson. He's writing about what he changed to not make the same mistake.

There is a total mismatch between what's written and how you're responding. We don't normally call people idiots for trying to help others avoid their mistakes.

The culture war around AI is obliterating discourse. Absolutely everything is forced through the lens of pro-AI or anti-AI, even when it's a completely neutral, "I deleted my data, here's what I changed to avoid doing it again", where the tool in question just happens to be AI.

Re: Claude Code wiped our production database with a Terraform command

#45
If you found this post helpful, follow me for more content like this.

I publish a weekly newsletter where I share practical insights on data and AI.

It focuses on projects I'm working on + interesting tools and resources I've recently tried: https://alexeyondata.substack.com

It's hard to take the author seriously when this immediately follows the post. I can only conclude that this post was for the views not anything to learn from or be concerned about.

Re: Claude Code wiped our production database with a Terraform command

#48

Despite multiple comments blaming the AI agent, I think it's the backups that are the problem here, right? With backups, almost any destructive action can be rolled back, whether it's from a dumb robot, a mistaken junior, or a sleep-deprived senior. Without, you're sort of running the clock waiting for disaster.

Yes, backups are great but a 'dumb robot' or a 'mistaken junior' shouldn't have access to prod. And a sleep-deprived senior? Even then. They shouldn't have access to destructive effects on prod. Maybe the senior can get broader access in a time-limited scope if senior management temporarily escalates the developers access to address a pressing production issue, but at that point the person addressing the issue should…

If a sleep-deprived senior shouldn’t have access to prod, I think we have big problems, frankly.

Re: Claude Code wiped our production database with a Terraform command

#49

Earlier quoted context omitted.

Yes, backups are great but a 'dumb robot' or a 'mistaken junior' shouldn't have access to prod. And a sleep-deprived senior? Even then. They shouldn't have access to destructive effects on prod. Maybe the senior can get broader access in a time-limited scope if senior management temporarily escalates the developers access to address a pressing production issue, but at that point the person addressing the issue should…

But smart robots like Claude should and will have access to production. There has to be something figured out on how to make sure operation remains smooth. The argument of don't do that will not be a viable position to hold long term. Keeping a human in the loop is not necessary.

It is absolutely necessary. Point in fact, most DEVs don't have access to PROD either. Specialists do.

Clause, maybe, is a junior DEV.

Not a release engineer.

Post reply on HN