Terragrunt is a wrapper around [[Terraform]] for performing tasks that you'd otherwise do by hand (or reinvent badly in your own shell scripts). It's mostly useful in large [[Amazon Web Services|AWS]] environments where you have multiple accounts and staging environments. It helps you take care of the _grunt work_. It keeps the code [[Don't repeat yourself|DRY]]. Terragrunt is simple. It merges the `hcl` files it uses for configuration, generates `tf` files and runs `terraform` on the generated files. This concept reminds me of [[ChainMap]] in [[Python]]. It encapsulates many dictionaries into one unit. ## Dependencies The `dependency` blocks exposes or pulls in the outputs of modules. The `dependency` block is used to configure module dependencies. Each dependency block exports the outputs of the target module as block attributes you can reference throughout the configuration. The `dependencies` block is used to enumerate all the Terragrunt modules that need to be applied in order for this module to be able to apply. Note that this is purely for ordering the operations when using `run-all` commands of Terraform. This does not expose or pull in the outputs like `dependency` blocks.