Introduction
As infrastructure scales to accommodate multiple business divisions and distinct deployment environments, standard Terraform configurations often become repetitive. You find yourself copy-pasting the same resource definitions across separate directories. Terragrunt keeps your Terraform configurations DRY (Don’t Repeat Yourself).
Using Terragrunt Inputs
Terragrunt decouples your generic infrastructure blueprints from their environment-specific deployment arguments. Instead of repeating resources, author a simple terragrunt.hcl config file:
include "root" {
path = find_in_parent_folders()
}
terraform {
source = "../../../modules//web_app"
}
inputs = {
instance_type = "t3.xlarge"
instance_count = 5
environment = "production"
}
← PreviousArchitecting Hub-and-Spoke Network Topologies in Microsoft Azure
Next →Shifting Left: Integrating Security Scanners (Trivy, Checkov) into CI/CD
Get in touch