How to rename Terraform resources the easy way

You can find plenty of information online about renaming Terraform resources for various reasons: refactoring, fixing typos, updating naming conventions, etc. What I’ve noticed is that most people either recreate the resource, create a new one, or use the moved block which isn’t as intuitive or straightforward. But it’s 2026, and there’s a simpler command that lets you rename resources without destroying them. the command Let’s say we made a typo when creating an EC2 instance e.g.: ...

January 12, 2026

Terraform and scuffed chaos engineering

A few days back, I stumbled upon an interesting post (unfortunately I couldn’t find the original source) about deliberately destroying random Terraform resources, or so called chaos engineering if you will. the command terraform destroy -auto-approve -target "$(terraform state list | shuf -n 1)" You can add this command to a cron job and schedule it to run every Friday evening for some weekend excitement. For a more sophisticated approach, there’s Chaos Monkey - the chaos engineering tool developed by Netflix. But if you’re just getting started with chaos engineering, this scuffed one-liner might be a better (not safer for sure) entry point. ...

January 8, 2026

Merge Terraform infra into a single file

A bit of shitposting today. These days everyone and their grandma are using infra as code or more likely Terraform to deploy infrastructure, whether its AWS, Azure, GCP, you name it. As time goes your infrastucture might get larger (or bloated if you will) and you’ll end up with spliting things up anyhow. But what happens if we just YOLO everything into a single .tf file? Just for fun. Here’s how to do it. ...

September 4, 2025