terragrunt-infrastructure-live-example
knowledge-base
terragrunt-infrastructure-live-example | knowledge-base | |
---|---|---|
23 | 1 | |
731 | 33 | |
2.5% | - | |
2.8 | 0.0 | |
about 2 months ago | over 2 years ago | |
HCL | ||
Apache License 2.0 | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
terragrunt-infrastructure-live-example
-
Terragrunt for Multi-Region/Multi-Account Deployments
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.
-
Seamless Cloud Infrastructure: Integrating Terragrunt and Terraform with AWS
NOTE: More information about the terragrunt.hcl file can be found in this example repository.
-
Manage multiple terraform environments in a single terraform workspace state file
Here's a pointer to an example repository with a Terragrunt monorepo (good, easy to manage), and each module called gets its unique statefile (good, smaller blast radius) where the tradeoff is learning a new tool and paradigm: https://github.com/gruntwork-io/terragrunt-infrastructure-live-example.
-
Migrate from terragrunt to terraform
I also highly recommend to check out how terragrunt recommends structuring your repo and even further details on this documentation page.
-
Conditionally set resource provider
https://github.com/gruntwork-io/terragrunt-infrastructure-live-example/blob/master/_envcommon/mysql.hcl https://terragrunt.gruntwork.io/docs/features/keep-your-terraform-code-dry/
-
Deploying globally (to all regions) on AWS with terragrunt
did you have a look at this example? https://github.com/gruntwork-io/terragrunt-infrastructure-live-example/blob/master/terragrunt.hcl
- How to structure Terraform with multi-env + multi-regions for TBD in monorepo
-
How to you segregate your dev and prod environments in the repository
Terragrunt! Using a scaffolding approach like this for inspiration https://github.com/gruntwork-io/terragrunt-infrastructure-live-example
-
Terraform / Terragrunt multi-environment - Pass in environment name
I would recommend taking a look at the example repo here: https://github.com/gruntwork-io/terragrunt-infrastructure-live-example. The layout you have doesn't look like a structure that would work well with terragrunt.
-
How you structure your terraform state?
A good example is in gruntwork-io / terragrunt-infrastructure-live-example repository and further documentation on Terragrunt's own documentation page.
knowledge-base
-
"A lot of the problems that Terragrunt solves have been solved better in other ways" - thoughts on this?
You might find this interesting: https://github.com/gruntwork-io/knowledge-base/discussions/92
What are some alternatives?
terragrunt-infrastructure-modules-example - A repo used to show examples file/folder structures you can use with Terragrunt and Terraform
terragrunt-atlantis-config - Generate Atlantis config for Terragrunt projects.
atlantis - Terraform Pull Request Automation
terraform-yaml-stack-config - Terraform module that loads an opinionated 'stack' configuration from local or remote YAML sources. It supports deep-merged variables, settings, ENV variables, backend config, and remote state outputs for Terraform and helmfile components.
terraform-aws-eks - Terraform module to create AWS Elastic Kubernetes (EKS) resources πΊπ¦
modules.tf-demo - Real modules.tf demo (updated May 2021)
terraform - Terraform enables you to safely and predictably create, change, and improve infrastructure. It is a source-available tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned.
terramate - Terramate CLI is an open-source Infrastructure as Code (IaC) orchestration tool for Terraform, OpenTofu, Terragrunt, Kubernetes, Pulumi, Cloud Formation, CDK, Azure Resource Manager (ARM), and others.
terrafunk - Utility that allows you to execute terraform and terragrunt functions from the command line for quick tests and looking at underlying cty values
terraform-example-foundation - Shows how the CFT modules can be composed to build a secure cloud foundation
cloud-nuke - A tool for cleaning up your cloud accounts by nuking (deleting) all resources within it