github gruntwork-io/terragrunt v0.93.5

latest release: beta-2025111101
4 hours ago

🧪 Experiments Updated

The filter-flag experiment now supports --filter in stack generate

The --filter flag can now be used in the stack generate command, and any command that performs stack generation, e.g. run --all (remember that you must use the filter-flag experiment to try this).

The --filter flag works in a slightly unique way when used to control stack generation in that it needs to be explicitly restricted to stacks for it to impact stack generation using the type=stack attribute filter.

e.g.

# Supported: Only generate the stacks that match the filter, as we are explicitly indicating that we are targeting stacks.
terragrunt stack generate --filter 'name=prod | type=stack'

# Not supported: This filter will be ignored, as we are not explicitly indicating that we are targeting stacks.
terragrunt stack generate --filter 'name=prod'  # This will not work

The reason for this is that stack generation can also be done automatically as part of other commands, like run, and thus we need to make it clear that we’re trying to control stack generation rather than run behavior.

# This will run any unit named 'vpc'
terragrunt run --all --filter 'vpc' -- plan

# This will run any unit named 'vpc', and prevent stack generation in any stack not named 'dev' (including any stacks named 'vpc')
terragrunt stack run --filter 'vpc' --filter 'name=dev | type=stack' -- apply

For more information, see the filter feature documentation

What's Changed

  • feat: Adding support for -filter in stack generate by @yhakbar in #5073
  • docs: Documenting -filter for stack generate by @yhakbar in #5084

Full Changelog: v0.93.4...v0.93.5

Don't miss a new terragrunt release

NewReleases is sending notifications on new releases.