2025-02-03, 16:00–16:25, Tofu / Cloud (B.3.013)
In this talk, I’ll share how we built a custom workflow to harness Terragrunt’s run-all feature in Atlantis, allowing us to run Terraform across multiple, interdependent stacks in parallel. I’ll walk you through the challenges we faced, the bugs we tackled, and the lessons we learned so you don’t have to reinvent the wheel. Our setup relies on Terraform and GitLab, but it’s easy to adapt for OpenTofu or other version control and CI/CD tools. If you’re looking to streamline Terragrunt-based infrastructure workflows without the headaches, this talk is for you!
Knowledge of terraform or tofu is required. You must have an idea of what terragrunt run-all is and what is used for. Knowledge of Atlantis is not required.
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.
Marco Marongiu works as Site Reliability Engineer for RiksTV, a small TV distributor, in Oslo, Norway. He started with infrastructure automation with CFEngine 2 and hasn’t stopped since, going through the early versions of Puppet, CFEngine 3, and now terraform/terragrunt.