← Back to Blog

Managing Multi-Account AWS Organizations with Terraform and Terragrunt

TerraformTerragruntAWSIaCMulti-Account

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.

Directory Structure

Here's the repository structure I use for managing 20+ AWS accounts:

infra/
├── modules/
│   ├── vpc/
│   ├── ecs-cluster/
│   └── rds/
├── environments/
│   ├── dev/
│   │   ├── us-east-1/
│   │   └── eu-west-1/
│   ├── staging/
│   └── prod/
├── accounts/
│   ├── landing-zone.hcl
│   ├── security.hcl
│   └── shared-services.hcl
└── terragrunt.hcl

Terragrunt's DRY principle means you define shared configuration once and override only what differs per environment.

← Back to BlogHome