Active Strict Controls
The following strict controls are available. See the strict controls overview for how to enable them.
bare-include
Throw an error when using a bare include.
bare-include - Reason
Backwards compatibility for supporting bare includes results in a performance penalty for Terragrunt, and deprecating support provides a significant performance improvement. For more information, see the Bare Include Migration Guide.
cas-source-inside-stack
Throw an error when a unit or stack block with update_source_with_cas sets a source inside the directory of its stack file.
cas-source-inside-stack - Reason
Stack generation copies the directory of a stack file whole. With update_source_with_cas, a source inside that directory is generated twice: once from the CAS reference, and once as part of the copy. run --all discovers the copy and runs it as its own unit, without the values its stack would give it.
Here the stack sits at the root of its source, so its units must sit inside the stack directory:
unit "foo" { source = "./units/foo" update_source_with_cas = true path = "foo"}stack "bar" { source = "../catalog" path = "bar"}.terragrunt-stack/bar/.terragrunt-stack/foo.terragrunt-stack/bar/units/fooExisting support will be retained for v1.x for backwards compatibility, to obey the Terragrunt 1.0 guarantees.
By default, Terragrunt warns once about each such block, pointing at its source:
WARN Setting the source of a `unit` or `stack` block with `update_source_with_cas` to a directory inside the stack directory is deprecated and will be removed in a future version of Terragrunt.WARN Source inside the stack directory --> ../catalog/terragrunt.stack.hcl:2:28 |2 | source = "./units/foo" | ^^^^^^^^^^^^^ | = Stack generation copies the directory of this stack file whole, so the generated stack contains this unit twice, and `run --all` runs the copy too. Move the unit directory out of the directory of this stack file, and use `//` in the stack's source to separate the catalog from the stack directory.Enabling the control turns each warning into an error:
stack bar: unit "foo" in terragrunt.stack.hcl sets update_source_with_cas on source "./units/foo" inside the directory of that stack file, so the generated stack also contains a copy of it; move the unit directory out of that directory and use // in the stack's source to separate the catalog from the stack directoryMove the stack into a subdirectory of the catalog, keep its sources outside that subdirectory, and use // in the stack’s source to separate the catalog from the stack directory:
unit "foo" { source = "../../units/foo" update_source_with_cas = true path = "foo"}stack "bar" { source = "../catalog//stacks/bar" path = "bar"}Everything before // is the catalog that update_source_with_cas sources resolve within, and only the directory after it is copied.
cli-redesign
Throw an error when using commands that were deprecated as part of the CLI redesign.
cli-redesign - Commands
run-allgraphgraph-dependencieshclfmthclvalidateoutput-module-groupsrender-jsonterragrunt-infovalidate-inputsaws-provider-patch
cli-redesign - Reason
These commands have been deprecated in favor of more consistent and intuitive commands as part of the CLI redesign. For more information, see the CLI Redesign Migration Guide.
The aws-provider-patch command was a workaround for a legacy Terraform bug where dynamic values in nested provider blocks were not handled correctly during terraform import. This workaround is no longer needed and the command has been deprecated. Remove it from any scripts or CI/CD pipelines.
default-command
Throw an error when using the Terragrunt default command.
default-command - Reason
Terragrunt now supports a special run command that can be used to explicitly forward commands to OpenTofu/Terraform when no shortcut exists in the Terragrunt CLI.
default-command - Example
The default command is deprecated and will be removed in a future version. Use terragrunt run instead.
dependency-config-path-file
Throw an error when a dependency block sets config_path to a file.
dependency-config-path-file - Reason
The config_path of a dependency block is the directory of a unit or a stack. Terragrunt has also accepted the path of a configuration file there:
dependency "db" { config_path = "../db/terragrunt.hcl"}This was never documented, and Terragrunt supported it inconsistently. Existing support will be retained for v1.x for backwards compatibility, to obey the Terragrunt 1.0 guarantees.
By default, Terragrunt warns once about each block whose config_path names a file, naming the block and the path:
/path/to/terragrunt.hcl: dependency db sets config_path to the file ../db/terragrunt.hcl; set it to the directory of the unit or stackEnabling the control turns each warning into an error with the same message.
Set config_path to the directory:
dependency "db" { config_path = "../db"}Terragrunt looks for terragrunt.hcl, terragrunt.hcl.json, or terragrunt.stack.hcl in that directory. A dependency whose configuration file has another name needs that file renamed before its directory can be used.
dependency-fetch-output-from-state
Throw an error when using the deprecated --dependency-fetch-output-from-state flag.
dependency-fetch-output-from-state - Reason
Terragrunt reads dependency outputs from state by default as of v1.2.0, so the flag has nothing left to enable. Remove it, or pass --no-dependency-fetch-output-from-state to load dependency outputs through tofu/terraform output -json instead.
dependency-fetch-output-from-state - Example
# This will show a warning (or error with strict control enabled)$ terragrunt run --all --dependency-fetch-output-from-state -- planWARN The `--dependency-fetch-output-from-state` flag is deprecated. Dependency outputs are read from state by default as of v1.2.0. Remove the flag, or use --no-dependency-fetch-output-from-state to opt out.deprecated-hidden-flag
Throw an error when using the deprecated --hidden flag.
deprecated-hidden-flag - Reason
Hidden directories are now included by default in find and list command results. The --hidden flag is no longer needed and has been deprecated. Use --no-hidden if you need to exclude hidden directories.
deprecated-hidden-flag - Example
# This will show a warning (or error with strict control enabled)$ terragrunt find --hiddenWARN The `--hidden` flag is deprecated and will be removed in a future version of Terragrunt. Hidden directories are now included by default. Use `--no-hidden` to exclude them.disable-command-validation
Throw an error when using the deprecated --disable-command-validation flag.
disable-command-validation - Reason
Command validation has been removed entirely from Terragrunt. The run command now accepts any command and passes it through to the underlying OpenTofu/Terraform binary. The --disable-command-validation flag is no longer needed and does nothing.
disable-dependent-modules
Throw an error when using the deprecated --disable-dependent-modules flag.
disable-dependent-modules - Reason
Dependent modules discovery has been removed from terragrunt render. The --disable-dependent-modules flag is no longer needed and has no effect.
disable-dependent-modules - Example
# This will show a warning (or error with strict control enabled)$ terragrunt render --format=json --disable-dependent-modulesWARN The `--disable-dependent-modules` flag is deprecated and will be removed in a future version of Terragrunt. Dependent modules discovery has been removed from `terragrunt render`, so this flag has no effect.duplicate-dependency-labels
Throw an error when two dependency blocks in one configuration address the same dependency, by sharing a label or a config_path.
duplicate-dependency-labels - Reason
Two dependency blocks written with the same label both parse, and Terragrunt then resolves every reference to that label to whichever block came last. The blocks before it are unreachable, with nothing to say so:
dependency "vpc" { config_path = "../vpc-us-east-1"}
dependency "vpc" { config_path = "../vpc-us-west-2"}
inputs = { # Reads ../vpc-us-west-2. The first block may as well not be there. vpc_id = dependency.vpc.outputs.vpc_id}Terragrunt warns about this by default. Enabling the control turns it into an error naming the address the blocks share:
/path/to/terragrunt.hcl: dependency vpc is declared more than once; every dependency needs an address of its ownGive each block a label of its own. A configuration that was relying on the shadowing to pick the last block should keep only that block.
Two blocks with different labels can also point at one config_path. Both are reachable, so the same unit is declared twice, and the two blocks drift apart as soon as one gains a mock_outputs or skip_outputs the other lacks:
dependency "vpc" { config_path = "../vpc"}
dependency "network" { config_path = "../vpc"}That is warned about by default too. Under the control it is an error naming both addresses and the path they share:
/path/to/terragrunt.hcl: dependencies vpc and network both point at ../vpc; declare that dependency once and reference it under one nameBlocks are compared by the address they resolve to rather than by label alone, so the elements of a block expanded with an expansion block, which all carry the label the block was written with, remain valid.
fast-copy
Switches include_in_copy and exclude_from_copy pattern matching from zglob to gobwas/glob when Terragrunt copies a module’s source folder.
fast-copy - Reason
The default implementation runs zglob once per pattern and recursively re-expands every directory match, which can dominate copy time on large module sources. gobwas compiles each pattern once and matches inline during the existing copy walk.
gobwas does not collapse ** when a neighbor is a wildcard, so a/**/*.tf matches a/sub/main.tf but not a/main.tf. Patterns that depended on zero-depth ** collapsing need brace alternation like {*.tf,**/*.tf} to cover both depths.
legacy-gcs-public-prefix
Stops auto-prefixing plain https://www.googleapis.com/storage/... source URLs with gcs::. Pre-v1.0.5 Terragrunt routed those URLs through the credentialed GCS getter; v1.0.5+ routes them through the HTTP getter for anonymous access. The legacy prefix-rewrite is restored by default with a deprecation warning. Enable this control to opt into the new behavior and silence the warning.
legacy-gcs-public-prefix - Reason
The legacy auto-prefixing made it impossible to download a public Cloud Storage object without GCP credentials, since every plain https://www.googleapis.com/storage/... URL was rewritten to use the credentialed getter. The new behavior leaves the URL alone so it resolves through the HTTP getter and downloads anonymously.
To keep using GCS credentials for a specific URL, prefix it with gcs:: yourself:
terraform { source = "gcs::https://www.googleapis.com/storage/v1/my-private-bucket/module.zip"}legacy-internal-tflint
Force the use of external tflint binary.
legacy-internal-tflint - Reason
The embedded version of tflint has been held back by upstream’s adoption of the BUSL license. As a result, the embedded version is horribly out of date, and we are deprecating it for removal in a future version of Terragrunt. You may use --terragrunt-external-tflint in your tflint hook to opt in to the use of an external tflint binary, or enable this strict control.
no-destroy-dependencies-check
Throw an error when using the deprecated --no-destroy-dependencies-check flag.
no-destroy-dependencies-check - Reason
The --no-destroy-dependencies-check flag is deprecated and no longer affects Terragrunt’s behavior. Dependency checks are now disabled by default during destroy operations. Use --destroy-dependencies-check to explicitly enable dependency checks when needed.
queue-exclude-external
Throw an error when using the deprecated --queue-exclude-external flag.
queue-exclude-external - Reason
External dependencies are now excluded by default. The --queue-exclude-external flag is no longer needed and has been deprecated. Use --queue-include-external if you need to include external dependencies.
queue-exclude-external - Example
# This will show a warning (or error with strict control enabled)$ terragrunt run --all plan --queue-exclude-externalWARN The `--queue-exclude-external` flag is deprecated and will be removed in a future version of Terragrunt. External dependencies are now excluded by default.queue-strict-include
Throw an error when using the deprecated --queue-strict-include flag.
queue-strict-include - Reason
The behavior of Terragrunt when using --queue-strict-include is now the default behavior. The --queue-strict-include flag is no longer needed and has been deprecated.
queue-strict-include - Example
# This will show a warning (or error with strict control enabled)$ terragrunt run --all plan --queue-strict-includeWARN The `--queue-strict-include` flag is deprecated and will be removed in a future version of Terragrunt. The behavior of Terragrunt when using `--queue-strict-include` is now the default behavior.root-terragrunt-hcl
Throw an error when users try to reference a root terragrunt.hcl file using find_in_parent_folders.
This control will also try to find other scenarios where users may be using terragrunt.hcl as the root configuration, including when using commands like scaffold and catalog, which can generate a terragrunt.hcl file expecting a terragrunt.hcl file at the root of the project. Enabling this flag adjusts the defaults for those commands so that they expect a recommended root.hcl file by default, and will throw an error if a terragrunt.hcl file is explicitly set.
root-terragrunt-hcl - Reason
Using a root terragrunt.hcl file was previously the recommended pattern to use with Terragrunt, but that is no longer the case. For more information see Migrating from root terragrunt.hcl.
skip-accesslogging-bucket-acl
Throw an error when the remote_state block for the s3 backend sets skip_accesslogging_bucket_acl.
skip-accesslogging-bucket-acl - Reason
S3 needs write access to the access logging bucket before it will deliver server access logs there. Terragrunt used to grant that with a bucket ACL, and skip_accesslogging_bucket_acl turned the grant off.
AWS recommends granting it with a bucket policy instead, and a bucket with ACLs disabled, the default for new buckets, rejects the ACL outright. Terragrunt writes the policy now, and skip_accesslogging_bucket_policy is the attribute that turns that off:
remote_state { backend = "s3" config = { bucket = "my-state-bucket" key = "${path_relative_to_include()}/tofu.tfstate" region = "us-east-1" accesslogging_bucket_name = "my-logs-bucket" skip_accesslogging_bucket_policy = true }}skip_accesslogging_bucket_acl is still parsed, but it no longer does anything: Terragrunt puts no ACL on the logging bucket, so the attribute has nothing to skip. It is not carried over to the bucket policy, because the common reason to have set it was an AccessControlListNotSupported failure on a bucket with ACLs disabled, and the policy is exactly what such a bucket needs. Terragrunt warns about the attribute by default; enabling the control turns the warning into an error:
The `skip_accesslogging_bucket_acl` config attribute is no longer supported. Terragrunt grants S3 access log delivery through a bucket policy rather than a bucket ACL. Use `skip_accesslogging_bucket_policy` instead.skip-bucket-root-access
Prevents the use of the deprecated skip_bucket_root_access config attribute in the remote_state block. Terragrunt no longer grants the AWS account root user access to S3 state buckets, so the attribute has nothing left to skip.
Terragrunt logs a deprecation warning when it bootstraps a backend whose config carries the attribute, which means terragrunt backend bootstrap or a run command with --backend-bootstrap. Enabling this control turns that warning into an error.
skip-bucket-root-access - Reason
Terragrunt used to attach a bucket policy statement with the Sid RootAccess to every S3 state bucket it bootstrapped, granting s3:* on the bucket and its objects to arn:aws:iam::<account-id>:root. skip_bucket_root_access existed to opt out of that statement. The statement is no longer written, so the attribute has no effect either way.
Remove the attribute from your configuration:
remote_state { backend = "s3" config = { # ... other config omitted for brevity ...
# Remove this. It no longer does anything. skip_bucket_root_access = true }}If you need the statement written, use enable_bucket_root_access instead. See Root user access to the state bucket for how to remove the statement from buckets that already carry it.
terragrunt-prefix-env-vars
Throw an error when using the TERRAGRUNT_ prefix for environment variables.
terragrunt-prefix-env-vars - Reason
This prefix has been renamed to TG_ to shorten the prefix, due to the work in RFC #3445.
terragrunt-prefix-env-vars - Example
The TERRAGRUNT_LOG_LEVEL env var is deprecated and will be removed in a future version. Use TG_LOG_LEVEL=info instead.
units-that-include
Throw an error when using the deprecated --units-that-include flag.
units-that-include - Reason
The --units-that-include flag has been deprecated. Use --filter='reading=<path>' to include units that include or read the specified configuration.
units-that-include - Example
# This will show a warning (or error with strict control enabled)$ terragrunt run --all plan --units-that-include=root.hclWARN The `--units-that-include` flag is deprecated and will be removed in a future version of Terragrunt. Use `--filter='reading=<path>'` to include units that include or read the specified configuration.use-partial-parse-config-cache
Throw an error when using the deprecated --use-partial-parse-config-cache flag.
use-partial-parse-config-cache - Reason
Terragrunt no longer has a partial parse cache for the --use-partial-parse-config-cache flag to enable, so the flag has no effect.
use-partial-parse-config-cache - Example
# This will show a warning (or error with strict control enabled)$ terragrunt run --all --use-partial-parse-config-cache -- planWARN The `--use-partial-parse-config-cache` flag is deprecated and will be removed in a future version of Terragrunt. Terragrunt no longer has a partial parse cache for it to enable, so this flag has no effect.