Terragrunt is a lightweight wrapper that adds extra features for maintaining DRY configurations, dealing with many Terraform modules, and managing remote state.
Following are the use cases of Terragrunt:
<> To Keep Our Background Configuration DRY (Don’t Repeat Yourself): By setting your backend configuration once in a root location and inheriting that information in all child modules, Terragrunt helps you to keep it DRY ("Don't Repeat Yourself").
<> To Keep Our Provider Configuration DRY: It might be difficult to unify provider configurations across all of your modules, especially if you wish to alter authentication credentials. You may use Terragrunt to refactor common Terraform code and keep your Terraform modules DRY by using it. The provider configurations can be defined once at a root location, just like the backend configuration.
<> To Keep Our Terraform Command Line Interface arguments DRY: In the Terraform universe, CLI flags are another typical source of copy/paste. It can be difficult and error-prone to have to remember these -var-file options every time. By declaring your CLI parameters as code in your terragrunt.hcl settings, Terragrunt helps you to keep your CLI arguments DRY.
<> To Promote Terraform modules that are immutable and versioned across environments: Large modules should be considered hazardous, according to one of the most important lessons we've learnt from building hundreds of thousands of lines of infrastructure code. That is, defining all of your environments (dev, stage, prod, and so on) or even a huge amount of infrastructure (servers, databases, load balancers, DNS, and so on) in a single Terraform module is a Bad Idea. Large modules are slow, insecure, difficult to update, code review, test, and are brittle. Terragrunt lets you define your Terraform code once and then promote a versioned, immutable "artifact" of that code from one environment to the next.
Posted Date:- 2021-11-23 06:04:50
How to ignore duplicate resource error during terraform apply?
Tell me the reasons to choose Terraform for DevOps?
How would you recover from a failed apply in Terraform?
How do you move the state from one source to another?
Does the taint command modify the infrastructure?
How do you inspect the current state of the infrastructure applied in terraform?
Is there a way to bulk import the state of the current cloud subscription into Terraform state?
How do you recover from a failed apply, where some resources were provisions, but others were not?
Can I add policies to the open-source or pro version of Terraform enterprise?
How can you handle CLI authentication on terraform cloud?
Which command is used to destroy Terraform-managed infrastructure?
Tell Us About Some of the Terraform CLI Commands and their Functions?
How to Ignore the Error Duplicate Resource During Terraform Apply?
How will you check whether your POVRay install is ok with the terraform?
Explain State File Locking in the context of Terraform.
Can I use Terraform for on-premises infrastructure?
What if I encounter a serious error and want to rollback?
Can I add policies to the open-source or Pro version of Terraform Enterprise?
What do you know about Terragrunt? What are its uses?
Are themes supported by terraforming?
What are the new factors in the latest v1.24.0 & v1.25.0 Terraform Azure Provider?
How to Store Sensitive Data in Terraform?
Why write tests for Sentinel policies?
What is Private Module Registry?
How can I check if the POVRay install is compatible with Terraform?
Why does POVRay render fields and does not display sometimes?
What are the different behaviors of Terraform plugins during discovery?
Do you know about the new factors in the latest v1.24.0 and v1.25.0 Terraform Azure Provider?
How will you control and handle rollbacks when something goes wrong?