Blocks
Terragrunt HCL configuration uses configuration blocks when there’s a structural configuration that needs to be defined for Terragrunt.
Think of configuration blocks as a way to control different systems used by Terragrunt, whereas attributes are used to define values for those systems.
Unit blocks
Section titled “Unit blocks”catalogConfigures the module catalogs that the catalog and scaffold commands read.
dependenciesLists the units that run before this one in a run queue, without reading their outputs.
dependencyReads another unit's outputs, and runs that unit first in a run queue.
engineRuns the unit's OpenTofu/Terraform commands through an IaC engine plugin.
errorsRetries or ignores errors from OpenTofu/Terraform commands and source downloads that match patterns you set.
excludeLeaves the unit out of a run queue when a condition is true, for the commands you list.
expansionGenerates one instance of a dependency, unit, or stack block per element of a collection.
featureDeclares a feature flag that the configuration reads as feature..value, with a default the --feature flag can override.
generateWrites a file into the directory where Terragrunt runs OpenTofu/Terraform, e.g. a provider configuration shared by many units.
includeMerges another Terragrunt configuration file into this one, e.g. a root.hcl that every unit shares.
localsNames values that the rest of the file reads as local..
remote_stateConfigures the OpenTofu/Terraform backend that stores a unit's state.
terraformConfigures where Terragrunt gets the OpenTofu/Terraform module and how it runs tofu or terraform.
variablesSets OpenTofu/Terraform variables like the inputs attribute, and chooses how Terragrunt passes them.
Stack blocks
Section titled “Stack blocks”autoincludeAdds dependencies and other configuration to a unit or stack when Terragrunt generates it.
expansionGenerates one instance of a dependency, unit, or stack block per element of a collection.
includeMerges another Terragrunt configuration file into this one, e.g. a root.hcl that every unit shares.
localsNames values that the rest of the file reads as local..
stackDefines a nested stack that Terragrunt generates from a stack file.
unitDefines a unit that Terragrunt generates from a stack file.