terragrunt.hcl configuration file—so you can accelerate your infrastructure as code workflow.
Terragrunt HCL: Your Control Center
Terragrunt’s primary configuration file, typically namedterragrunt.hcl, dictates how Terragrunt orchestrates your Terraform modules. Built on the HashiCorp Configuration Language (HCL), it provides a declarative syntax optimized for readability and collaboration.

Inheritance Model
Terragrunt employs a hierarchical inheritance model. Child configurations automatically inherit settings from their parent, letting you define common parameters once and reuse them throughout your repository.
Leverage
include blocks to pull shared settings from a root terragrunt.hcl. This keeps your configurations DRY and consistent.Configuration Blocks Overview
Terragrunt organizes settings into named blocks. Here are the most common ones:| Block | Purpose |
|---|---|
| locals | Define reusable variables and computed values |
| include | Inherit settings from a parent terragrunt.hcl |
| remote_state | Configure backend storage and locking for Terraform state |

locals
Uselocals to declare reusable values or perform simple computations:
include
Pull in a parent configuration to inherit common settings:Module Configuration
Define which Terraform module to source and supply its input variables:- source: URL or path (Git, Terraform Registry, local directory)
- ref: Git tag, branch, or commit to pin module versions
- inputs: Map of module variables required by your Terraform code
Remote State Configuration
Storing your Terraform state remotely ensures consistency, collaboration, and safe locking. Terragrunt makes it simple to configure state backends, such as Amazon S3 with DynamoDB-based locks:
Ensure your IAM policies allow both S3 access and DynamoDB locking to prevent state corruption or conflicts.