Skip to content

Migrating from Queue Flags to Filter

This guide explains how to migrate from the legacy queue control flags to the modern --filter flag.

The queue control flags are currently aliased to their equivalent --filter expressions, but will be deprecated in a future version of Terragrunt. We recommend migrating to --filter to take advantage of its more flexible and composable syntax.

Legacy Flag Status Filter Equivalent
--queue-include-dir=<path> Aliased to filter --filter='<path>'
--queue-exclude-dir=<path> Aliased to filter --filter='!<path>'
--queue-exclude-external Now default behavior Not needed
--queue-strict-include Now default behavior Not needed
--units-that-include=<path> Aliased to filter --filter='reading=<path>'
--queue-include-external Current --filter='{./**}...'

Before:

Terminal window
terragrunt run --all --queue-include-dir=./networking -- plan

After:

Terminal window
terragrunt run --all --filter='./networking' -- plan

Before:

Terminal window
terragrunt run --all --queue-exclude-dir=./legacy -- plan

After:

Terminal window
terragrunt run --all --filter='!./legacy' -- plan

This flag is no longer needed. External dependencies are now excluded by default.

Before:

Terminal window
terragrunt run --all --queue-exclude-external -- plan

After:

Terminal window
# No flag needed — external dependencies are excluded by default
terragrunt run --all -- plan

If you need to include external dependencies, use:

Terminal window
terragrunt run --all --filter='{./**}...' -- plan

This flag is no longer needed. The behavior it enabled (only including units matching --queue-include-dir) is now the default.

Before:

Terminal window
terragrunt run --all --queue-include-dir=./networking --queue-strict-include -- plan

After:

Terminal window
terragrunt run --all --filter='./networking' -- plan

Before:

Terminal window
terragrunt run --all --units-that-include=shared.hcl -- plan

After:

Terminal window
terragrunt run --all --filter='reading=shared.hcl' -- plan