From 2 to 50 Terraform Modules: Orchestrating Properly with Terragrunt Stacks
summary
Explains how Terragrunt Stacks helps orchestrate many Terraform modules (from a few to dozens) to avoid duplication, manage inter-module dependencies, enforce correct execution order, and make CI/CD reproducible without fragile scripts. Presents the mental model (unit/stack/dependencies), demonstrates terragrunt stack run on a minimal repo without a cloud provider, and discusses concrete impacts on team workflows. Concludes with a comparison to terragrunt run-all and a simple decision grid for when Stacks is worthwhile versus keeping a simpler setup.
AI-written summary · about
chapters (20)
- 0:00Terragrunt Stacks intro
- 1:15Manual TF dependency issues
- 2:38Stacks solution overview
- 3:42Three pillars of Stacks
- 5:31Demo repo structure
- 7:04Generating environments
- 8:32Defining units and stacks
- 9:15Deploying with run apply
- 9:58Targeting environments
- 10:45Viewing stack outputs
- 11:30Performance gains
- 12:54Avoiding duplication
- 13:39Learning curve limits
- 14:42When to adopt Stacks
- 16:12Adoption best practices
- 16:45Q&A: Dependencies
- 17:54Q&A: Backend management
- 19:18Q&A: Atlantis integration
- 19:39Q&A: Dependency modes
- 20:22Summary
