Skip to main content

Feature Flags

Pipelines supports optional feature flags that allow you to enable or disable specific behaviors. You can configure these flags by setting them as environment variables within your HCL or YAML configuration files.

Available Flags

PIPELINES_FEATURE_EXPERIMENT_ALL

  • Enables all Pipelines experiment flags.

  • Default Value: Disabled

  • How to Enable: Set to "true"

PIPELINES_FEATURE_EXPERIMENT_AGGRESSIVE_CONSOLIDATION

  • Enables Pipelines to consolidate as many Terragrunt plan/apply changes as possible into a single run-all job. This leads to less duplicated work e.g. when both FileChanged and a EnvCommonChanged should trigger a plan in the same unit. When consolidate_added_or_changed is enabled this will include Module Changed / Added jobs.

    This behavior will likely become the default in a major release of Pipelines but is currently opt-in due to being a breaking change to functionality.

  • Default Value in Pipelines GitHub v3/GitLab v1: Disabled

  • Default Value in Pipelines GitHub v4+/GitLab v2+: Enabled

  • How to Enable: Set to "true"

PIPELINES_FEATURE_EXPERIMENT_COLOCATED_FILE_UNIT_CHANGE_DETECTION

  • Enables changes to files within a Terragrunt Unit to be detected as a ModuleChanged job instead of a FileChanged job. A Terragrunt Unit is any directory excluding the root of the repository containing a terragrunt.hcl file.

    E.g. given a repository containing the following files:

    tags.yml
    dir1/terragrunt.hcl
    dir1/myvars.json

    When this flag is enabled Pipelines will detect changes to dir1/myvars.json as a ModuleChanged for dir1 and run Terragrunt Plan/Apply for this directory. While tags.yml will be detected as as a FileChanged event and Pipelines will run Terragrunt with queue-include-units-reading for this file.

    This behavior will likely become the default in a major release of Pipelines but is currently opt-in due to being a breaking change to functionality.

  • Default Value in Pipelines GitHub v3/GitLab v1: Disabled

  • Default Value in Pipelines GitHub v4+/GitLab v2+: Enabled

  • How to Enable: Set to "true"

PIPELINES_FEATURE_EXPERIMENT_DISABLE_PREFLIGHT_AHEAD_OF_DEPLOY_BRANCH

  • Allows users to opt-out of the preflight check that prevents Pipelines from running if the current commit is behind the tip of the deploy branch.

    We do not recommend enabling this feature by default as it removes the guarantee that Pipelines will apply the reviewed plan. This feature exists to unblock teams that are facing contention issues keeping branches ahead of their deploy branch - and is 'at your own risk'.

  • Default Value: Disabled

  • How to Enable: Set to "true"

PIPELINES_FEATURE_EXPERIMENT_GENERATE_ALL_STACKS

  • Causes Pipelines to generate all stacks before running a plan or apply operation. This ensures that any stacks that are dependencies of units outside of the current stack or unit are available during the execution.

  • Default Value: Disabled

  • How to Enable: Set to "true"

PIPELINES_FEATURE_EXPERIMENT_IGNORE_UNITS_WITHOUT_ENVIRONMENT

  • Causes units and files in units to no longer be detected as changes when the flag is enabled and they have no environment.

    With Account Factory, new root directories will not be treated as new accounts if they do not have an environment.

    When running plans and applies, units with no environment are excluded from the Terragrunt DAG.

    Note: Adding an environment will not cause units to be detected as an added unit. You will need to also modify the units (e.g., make a whitespace change) to trigger detection.

  • Default Value: Disabled

  • How to Enable: Set to "true"

PIPELINES_FEATURE_EXPERIMENT_MINIMIZE_BLAST_RADIUS

  • Enables Terragrunt features to reduce the potential changes during a run-all. Terragrunt queue-strict-include and queue-exclude-external are enabled by default which excludes dependencies from being planned/applied during run-all, and more closely matches the behavior of a single unit change.

  • Default Value in Pipelines GitHub v3/GitLab v1: Disabled

  • Default Value in Pipelines GitHub v4+/GitLab v2+: Enabled

  • How to Enable: Set to "true"

Deprecated Flags

The following flags are valid in Pipelines GitHub v3/GitLab v1 but are deprecated in Pipelines GitHub v4+/GitLab v2+.

PIPELINES_FEATURE_TERRAGRUNT_INCLUDE_UNITS_READING

  • Enables FileChanged jobs where changes to non HCL files trigger Terragrunt runs using queue-include-units-reading.

    This is a break-glass feature flag and can be used to disable this functionality if it is causing issues.

  • Default Value: Enabled if the detected Terragrunt version supports queue-include-units-reading

  • How to Disable: Set to "false"

PIPELINES_FEATURE_TERRAGRUNT_STACK_GENERATE

  • Enables native Terragrunt stack support using commands like terragrunt stack generate.

    This is a break-glass feature flag and can be used to disable this functionality if it is causing issues.

  • Default Value: Enabled if the detected Terragrunt version supports stacks

  • How to Disable: Set to "false"