gruntwork-io / terragrunt

Terragrunt is a flexible orchestration tool that allows Infrastructure as Code written in OpenTofu/Terraform to scale.
https://terragrunt.gruntwork.io/
MIT License
7.85k stars 963 forks source link

Terragrunt "global" hooks and extra_arguments #2354

Open guilhermepozo opened 1 year ago

guilhermepozo commented 1 year ago

Terragrunt have some functionality to create "global" blocks? (extra_arguments, hooks)

It means to create the same blocks on each stack,

denis256 commented 1 year ago

Hi, code that is repeating can be extracted to a common HCL file and later included

More details in: https://terragrunt.gruntwork.io/docs/reference/config-blocks-and-attributes/#include (merge_strategy)

guilhermepozo commented 1 year ago

Hi, good point, but you have to explicitly declare the include, right?

i guess the global hook is more useful when you want to "enforce" some blocks.