Managing infrastructure across multiple AWS accounts can be challenging. In this post, I demonstrate how to use Terraform and Terragrunt to manage a multi-account AWS Organization efficiently. Topics covered include: setting up a proper directory structure, using Terragrunt for DRY configuration, implementing approval workflows, managing state files across accounts, handling cross-account IAM roles, and implementing automated testing with Terratest. I'll also share my production-ready repository structure and best practices learned from managing 20+ AWS accounts.
15 min read