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.
Overview
Section titled “Overview”| 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='{./**}...' |
Migrating --queue-include-dir
Section titled “Migrating --queue-include-dir”Before:
terragrunt run --all --queue-include-dir=./networking -- planAfter:
terragrunt run --all --filter='./networking' -- planMigrating --queue-exclude-dir
Section titled “Migrating --queue-exclude-dir”Before:
terragrunt run --all --queue-exclude-dir=./legacy -- planAfter:
terragrunt run --all --filter='!./legacy' -- planMigrating --queue-exclude-external
Section titled “Migrating --queue-exclude-external”This flag is no longer needed. External dependencies are now excluded by default.
Before:
terragrunt run --all --queue-exclude-external -- planAfter:
# No flag needed — external dependencies are excluded by defaultterragrunt run --all -- planIf you need to include external dependencies, use:
terragrunt run --all --filter='{./**}...' -- planMigrating --queue-strict-include
Section titled “Migrating --queue-strict-include”This flag is no longer needed. The behavior it enabled (only including units matching --queue-include-dir) is now the default.
Before:
terragrunt run --all --queue-include-dir=./networking --queue-strict-include -- planAfter:
terragrunt run --all --filter='./networking' -- planMigrating --units-that-include
Section titled “Migrating --units-that-include”Before:
terragrunt run --all --units-that-include=shared.hcl -- planAfter:
terragrunt run --all --filter='reading=shared.hcl' -- plan