
Refactoring Terraform: From One File to Modules
One flat file works until it doesn't, here is how to fix that
#aws#terraform
3 posts

One flat file works until it doesn't, here is how to fix that

Stop storing your state locally, here is the right way to do it on AWS

I wanted to stop consuming Terraform modules and start writing them. The best way I know how to learn something is to build something real, break it, fix it, and understand why it works. So I sat down and built a full three tier AWS architecture from scratch, no copy paste, no AI, just me, the Terraform docs, and a lot of errors. Here is what I ended up with and what I learned along the way.