Skip to content

Commit bf11b8a

Browse files
Add Feature Flags docs (#2585)
* Add Feature Flags docs * Add ignore filter docs * Switch ignore list separator to comma(,) * Update with changes * Fix wording * Apply suggestions from code review Co-authored-by: Yousif Akbar <[email protected]> --------- Co-authored-by: Yousif Akbar <[email protected]>
1 parent fac88a2 commit bf11b8a

File tree

6 files changed

+177
-1
lines changed

6 files changed

+177
-1
lines changed

custom-dictionary.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,5 @@ preconfigured
5353
projectprefix
5454
GOVCLOUD
5555
rollouts
56+
myvars
57+
myfile

docs/2.0/reference/pipelines/configurations-as-code/api.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,14 @@ The Infrastructure as Code(Iac) binary that Pipelines will instruct Terragrunt t
292292
<HclListItemDefaultValue defaultValue="opentofu"/>
293293
</HclListItem>
294294

295+
<HclListItem name="ignore_list" requirement="optional" type="string">
296+
<HclListItemDescription>
297+
298+
A comma separate list of ignore filters to exclude from pipelines runs. See the full documentation [here](/2.0/reference/pipelines/ignore-list)
299+
300+
</HclListItemDescription>
301+
</HclListItem>
302+
295303
### `filter` block attributes
296304

297305
<HclListItem name="paths" requirement="required" type="array[string]">

docs/2.0/reference/pipelines/configurations.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ pipelines:
8989
</HclListItemExample>
9090
</HclListItem>
9191
92-
9392
#### env
9493
9594
<HclListItem name="env" requirement="optional" type="sequence(mapping)">
@@ -176,6 +175,22 @@ pipelines:
176175
</HclListItemExample>
177176
</HclListItem>
178177
178+
#### ignore-list
179+
180+
<HclListItem name="ignore-list" requirement="required" type="string">
181+
<HclListItemDescription>
182+
A comma separate list of ignore filters to exclude from pipelines runs. See the full documentation [here](/2.0/reference/pipelines/ignore-list)
183+
</HclListItemDescription>
184+
<HclListItemExample>
185+
186+
```yaml
187+
pipelines:
188+
ignore-list: README.md,**/README.md
189+
```
190+
191+
</HclListItemExample>
192+
</HclListItem>
193+
179194
## Deprecated Configuration Options
180195
181196
#### enable-terragrunt-provider-cache
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# Feature Flags
2+
3+
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](/2.0/reference/pipelines/configurations-as-code/api#env-block) or [YAML](/2.0/reference/pipelines/configurations#env) configuration files.
4+
5+
6+
## Available Flags
7+
8+
#### `PIPELINES_FEATURE_EXPERIMENT_ALL`
9+
<ul>
10+
<li>
11+
Enables all Pipelines experiment flags.
12+
</li>
13+
<li>
14+
**Default Value**: Disabled
15+
</li>
16+
<li>
17+
**How to Enable**: Set to `"true"`
18+
</li>
19+
</ul>
20+
21+
#### `PIPELINES_FEATURE_EXPERIMENT_AGGRESSIVE_CONSOLIDATION`
22+
<ul>
23+
<li>
24+
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](/2.0/reference/pipelines/configurations-as-code/api#consolidate_added_or_changed) is enabled this will include Module Changed / Added jobs.
25+
26+
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.
27+
</li>
28+
<li>
29+
**Default Value**: Disabled
30+
</li>
31+
<li>**How to Enable**: Set to `"true"`</li>
32+
</ul>
33+
34+
#### `PIPELINES_FEATURE_EXPERIMENT_COLOCATED_FILE_UNIT_CHANGE_DETECTION`
35+
<ul>
36+
<li>
37+
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.
38+
39+
E.g. given a repository containing the following files:
40+
```
41+
tags.yml
42+
dir1/terragrunt.hcl
43+
dir1/myvars.json
44+
```
45+
46+
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](https://terragrunt.gruntwork.io/docs/reference/cli-options/#queue-include-units-reading) for this file.
47+
48+
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.
49+
</li>
50+
<li>
51+
**Default Value**: Disabled
52+
</li>
53+
<li>
54+
**How to Enable**: Set to `"true"`
55+
</li>
56+
</ul>
57+
58+
#### `PIPELINES_FEATURE_EXPERIMENT_MINIMIZE_BLAST_RADIUS`
59+
<ul>
60+
<li>
61+
Enables Terragrunt features to reduce the potential changes during a run-all. Terragrunt [queue-strict-include](https://terragrunt.gruntwork.io/docs/reference/cli-options/#queue-strict-include) and [queue-exclude-external](https://terragrunt.gruntwork.io/docs/reference/cli-options/#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.
62+
63+
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.
64+
</li>
65+
<li>
66+
**Default Value**: Disabled
67+
</li>
68+
<li>
69+
**How to Enable**: Set to `"true"`
70+
</li>
71+
</ul>
72+
73+
#### `PIPELINES_FEATURE_TERRAGRUNT_INCLUDE_UNITS_READING`
74+
<ul>
75+
<li>
76+
Enables FileChanged jobs where changes to non HCL files trigger Terragrunt runs using [queue-include-units-reading](https://terragrunt.gruntwork.io/docs/reference/cli-options/#queue-include-units-reading).
77+
78+
This is a break-glass feature flag and can be used to disable this functionality if it is causing issues.
79+
</li>
80+
<li>
81+
**Default Value**: Enabled if the detected Terragrunt version supports [queue-include-units-reading](https://terragrunt.gruntwork.io/docs/reference/cli-options/#queue-include-units-reading)
82+
</li>
83+
<li>
84+
**How to Disable**: Set to `"false"`
85+
</li>
86+
</ul>
87+
88+
#### `PIPELINES_FEATURE_TERRAGRUNT_STACK_GENERATE`
89+
<ul>
90+
<li>
91+
Enables native Terragrunt stack support using commands like `terragrunt stack generate`.
92+
93+
This is a break-glass feature flag and can be used to disable this functionality if it is causing issues.
94+
</li>
95+
<li>
96+
**Default Value**: Enabled if the detected Terragrunt version supports [stacks](https://terragrunt.gruntwork.io/docs/reference/cli-options/#stack-commands)
97+
</li>
98+
<li>
99+
**How to Disable**: Set to `"false"`
100+
</li>
101+
</ul>
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Pipelines Ignore List
2+
3+
Pipelines supports ignoring files by setting the Ignore List [HCL](/2.0/reference/pipelines/configurations-as-code/api#ignore_list) or [YAML](/2.0/reference/pipelines/configurations#ignore-list) configuration value.
4+
5+
## Syntax
6+
7+
The Ignore List can contain multiple filter patterns separated by the `,` character.
8+
9+
- `,` Is used as a separator between filters
10+
- `*` Matches any character except `/`, for matches within a specific directory.
11+
- `**` Matches any character, for matches across multiple directories.
12+
13+
## Common Examples
14+
15+
### Ignore specific files
16+
17+
`myfile.yml` - Matches the exact path to this file at the root level.
18+
19+
`myfile.yml,a/b/c/myfile.yml` - Matches both of these specific paths. Multiple patterns can be specified by separating them with `,`.
20+
21+
### Ignore all files with extension .md
22+
23+
`**.md` - Matches all paths ending in .md, regardless of directory depth.
24+
25+
### Ignore README.md everywhere
26+
27+
`README.md,**/README.md` - Matches the root README.md as well as any README.md in any directory.
28+
29+
### Ignore all files in a directory
30+
31+
`a/**` - Matches any file in `a` or a subdirectory of `a`. For example, both `a/myfile.yml` and `a/b/c/myfile.yml` will be ignored.
32+
33+
### Ignore all files with extension .md in a directory
34+
35+
`docs/**.md` - Matches all .md files in the docs directory and its subdirectories. For example, `docs/file.md` will be ignored, but not `docs/file.yml`.
36+
37+
### Ignore all files only in a specific directory, but not subdirectories
38+
39+
`a/*` - Matches any file directly in the `a` directory, but not in subdirectories. For example, `a/myfile.yml` is ignored, but `a/b/c/myfile.yml` is not.
40+

sidebars/reference.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,16 @@ const sidebar = [
5353
},
5454
],
5555
},
56+
{
57+
label: "Ignore List",
58+
type: "doc",
59+
id: "2.0/reference/pipelines/ignore-list",
60+
},
61+
{
62+
label: "Feature Flags",
63+
type: "doc",
64+
id: "2.0/reference/pipelines/feature-flags",
65+
},
5666
{
5767
value: "Gruntwork Patcher",
5868
type: "html",

0 commit comments

Comments
 (0)