Contents
What is terragrunt used for?
Terragrunt is a thin wrapper that provides extra tools for keeping your configurations DRY, working with multiple Terraform modules, and managing remote state.
What is Terragrunt HCL file?
The terragrunt. hcl file above sets the source parameter to point at the app module you just created in your infrastructure-modules repo, using the ref parameter to specify version v0. 0.1 of that repo. It also configures the variables for this module for the prod environment in the inputs = {…} block.
Is Terragrunt open source?
Terragrunt is an open source project, and contributions from the community are very welcome!
How do I set up Terragrunt?
Install Terragrunt
- Go to the Releases Page.
- Downloading the binary for your operating system: e.g., if you’re on a Mac, download terragrunt_darwin_amd64 ; if you’re on Windows, download terragrunt_windows_amd64.exe , etc.
- Rename the downloaded file to terragrunt .
- Add execute permissions to the binary.
Do we need Terragrunt?
We used Terragrunt to solve this issue. Terragrunt is a thin wrapper that provides extra tools for keeping your configurations DRY, working with multiple Terraform modules, and managing remote state. DRY means don’t repeat yourself. That helped a lot with self-repeating modules we had to use in this architecture.
How do I run Terragrunt locally?
For each module that is being processed via a run-all command, Terragrunt will read in the source parameter in that module’s terragrunt. hcl file, parse out the path (the portion after the double-slash), and append the path to the –terragrunt-source parameter to create the final local path for that module.
What is Terraform wrapper?
This Terraform wrapper is a script that gets checked in with your Terraform project’s source code and automatically loads the appropriate version of Terraform for the particular project.
What is dry Terragrunt?
Terragrunt is a thin wrapper that provides extra tools for keeping your configurations DRY (Don’t Repeat Yourself), working with multiple Terraform modules, and managing remote state.
What is Terragrunt cache?
Terragrunt creates a . terragrunt-cache folder in the current working directory as its scratch directory. It downloads your remote Terraform configurations into this folder, runs your Terraform commands in this folder, and any modules and providers those commands download also get stored in this folder.
How do I run terraform code locally?
Automated Terraform CLI Workflow
- Initialize the Terraform working directory.
- Produce a plan for changing resources to match the current configuration.
- Have a human operator review that plan, to ensure it is acceptable.
- Apply the changes described by the plan.
What do you need to know about terragrunt?
Terragrunt is a thin wrapper for Terraform that provides extra tools for keeping your Terraform configurations DRY, working with multiple Terraform modules, and managing remote state.
How to use terragrunt instead of TerraForm command line?
To use it, you: 1 Install Terraform. 2 Install Terragrunt. 3 Put your Terragrunt configuration in a terragrunt.hcl file. You’ll see several example configurations shortly. 4 Now, instead of running terraform directly, you run the same commands with terragrunt:
Where do I Find my terragrunt plan file?
When you run terragrunt plan or terragrunt apply, you can see that this file is created in the module working directory: CLI flags are another common source of copy/paste in the Terraform world. For example, a typical pattern with Terraform is to define common account-level variables in an account.tfvars file:
Where to find terragrunt.hcl in directory tree?
The find_in_parent_folders () helper will automatically search up the directory tree to find the root terragrunt.hcl and inherit the remote_state configuration from it.