In this talk, I’ll walk you through how we leveraged Terragrunt’s powerful run-all feature within Atlantis and built a custom workflow to do it. I’ll also share the key lessons we learned along the way, so you can build your own workflow without facing the same challenges we did. While our setup is based on Terraform for Infrastructure-as-Code (IaC) and GitLab for repositories with integrated CI/CD pipelines, the principles are easy to adapt to OpenTofu (IaC), and other repository and CI/CD solutions.
Atlantis is a well-known tool for running Terraform CI/CD pipelines, and Terragrunt is widely used to orchestrate and scale Terraform code. Terragrunt’s run-all feature enables Terraform to run in parallel across multiple stacks, handling inter-stack dependencies. Although Atlantis offers a basic custom workflow to run Terragrunt on Terraform, we couldn’t find a ready-made solution that allowed us to use the run-all feature. This gap presented both a challenge and an opportunity, so we dove in.
It wasn’t exactly smooth sailing, especially when certain bugs in Atlantis caused additional hurdles. But after plenty of troubleshooting, we made it work, and I’m here to share our journey—mistakes and all—so you don’t have to make the same ones.