-
terragrunt-infrastructure-live-example
A repo used to show examples file/folder structures you can use with Terragrunt and Terraform
In the official Terragrunt documentation there is a good article about how to set up a Terragrunt project and where to place modules. In fact, there is also a repository on GitHub providing an example project on how the creators recommend setting up Terragrunt. I certainly recommend going through that repository, because it is a good reference for a starting point. Having that said, I like to structure mine a little bit differently. My recommendation is to have different AWS accounts for each environment. Getting a new account usually is relatively easy to accomplish even if we are working in a corporate environment (your workplace most likely is using AWS Organizations to manage accounts). The existence of multiple accounts does not require additional costs, we only pay for what we use.
-
CodeRabbit
CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
-
In the terraform block we have to specify a path to a Terraform module. For example, in this case, we use the VPC module from the terraform-aws-modules open source project. We don't necessarily need to rely on other people's code, we can use modules maintained by ourselves by providing a link to a remote Git repository, or we can even have it point to a local path on our drive.
-
terramate
Open-source Infrastructure as Code (IaC) orchestration platform: GitOps workflows, orchestration, code generation, observability, drift detection, asset management, policies, Slack notifications, and more. Integrates with Terraform, OpenTofu, Terragrunt, Kubernetes, GitHub Actions, GitLab CI/CD, BitBucket Pipelines, and any other CI/CD platform.
Terramate: It seems like a good alternative, and I think it could have been a better choice for certain issues we had. With Terramate the transition from Terraform might have been easier since Terraform projects can be imported seamlessly. Furthermore, we don't have to think right away about how to modularize everything. The reason it was not chosen, is that my team was mainly familiar with Terragrunt. We had no experience with Terramate, so we decided to play it safely.
Related posts
-
Terraform-AWS-modules/Terraform-AWS-eks transitions to non-free license
-
Despliega una Infraestructura de Red AWS Robusta con Terraform
-
Un cóctel perfecto 🍹 ECS Fargate, Service Connect,Terraform y Github Actions.
-
Private github monorepo to store official AWS terraform modules as github submodules
-
Cost optimisation on AWS: Navigating NAT Charges with Private ECS Tasks on Fargate