Rolling out Pipelines to an existing infrastructure repo can be challenging. By default, Pipelines detects and runs against every OpenTofu/Terraform unit it finds. That’s great for full coverage, but not so great when you’re trying to adopt Pipelines incrementally, especially when some units would trigger errors and block deploys.
To make this easier, we’ve added a new experimental feature flag:
PIPELINES_FEATURE_EXPERIMENT_IGNORE_UNITS_WITHOUT_ENVIRONMENT
When enabled, Pipelines will only operate on units that are explicitly assigned to an environment.
What this means in practice:
This makes it much easier to onboard brownfield infrastructures gradually. Just define environments for the units you want Pipelines to manage, and leave everything else untouched.
The change is available as of v4.1.0. This will become the default behavior in a future version of Pipelines. To take advantage today, set the following flag to "true" in your configuration file:
One important note:
Adding an environment to an existing unit won’t automatically trigger change detection. You’ll need to make a small change to the unit (even whitespace) before it runs in your pipeline.