Two years ago our infrastructure repository was one Terraform root per environment, each a few thousand lines, all on AWS. Then the company acquired a product that ran on Azure, and a data residency deal required a second AWS region. Copy-paste got us through the first quarter. By the second, we had 140 state files, three slightly different VPC definitions, and a production plan that took eleven minutes and touched resources nobody intended to change. This post is the layout we rebuilt around. I...
Terraform and Terragrunt repo layout for AWS plus Azure: modules, units and stacks
Our Terraform repo grew to two clouds, four environments and 140 state files, and every change felt risky. This is the layout we moved to: versioned modules, a unit catalog, Terragrunt stacks per region, and one state file per small blast radius.
This is a paid story
Subscribe to read the full content, access all paid stories, and support the authors.
Add a label
Embed this post
<iframe src="https://www.hibug.me/terraform-terragrunt-multi-cloud-repo-layout" width="700" height="420" frameborder="0" loading="lazy"></iframe>
I am a Senior Software Engineer with over a decade of hands-on experience building, scaling, and maintaining complex systems across the full stack—spanning frontend, backend, and DevOps. Over the last 10 years, I have navigated diverse architectures and untangled some of the most frustrating, elusive bugs in production. I believe that every production incident is a massive learning opportunity. Having discovered hibug.me, I am excited to contribute to this knowledge base, breaking down root causes, and sharing verified fixes to help fellow developers debug faster and build more resilient systems.
Comments
0No comments yet. Be the first to comment!
Sign In to post a comment.