You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/ce/drift/backendless-scoping-projects.mdx
+26Lines changed: 26 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -103,6 +103,32 @@ Here, every project generated from the `crdb` block whose directory matches `pro
103
103
104
104
Per-block patterns and top-level patterns compose: a project must pass both checks to run drift detection.
105
105
106
+
## Limiting Terragrunt concurrency
107
+
108
+
For large Terragrunt estates, an unbounded run can overwhelm the runner with memory and process churn. Use `drift_terragrunt_parallelism` to cap how many modules Terragrunt loads at once during each drift run — this is the `digger.yml` equivalent of `terragrunt run-all plan -parallelism=N`.
109
+
110
+
It can be set at three scopes; the most specific wins:
111
+
112
+
- **Project** (under a `projects:` entry): overrides everything for that one project.
113
+
- **Block** (inside a `generate_projects.blocks[]` entry): applies to every project generated by that block.
114
+
- **Top-level** (directly under `generate_projects:`): applies to every project that does not set its own value.
115
+
116
+
```yaml
117
+
generate_projects:
118
+
drift_terragrunt_parallelism: 10 # default for every project below
119
+
blocks:
120
+
- block_name: prod
121
+
include: "live/prod/**"
122
+
terragrunt: true
123
+
drift_terragrunt_parallelism: 20 # override for this block
124
+
- block_name: staging
125
+
include: "live/staging/**"
126
+
terragrunt: true
127
+
# inherits the top-level 10
128
+
```
129
+
130
+
When set, Digger appends `-parallelism=N` to every Terragrunt invocation (init, plan, apply, destroy) **during drift detection only** — `digger plan` and `digger apply` runs are unaffected. Valid values are `1` through `20`. Leave it unset to use Terragrunt's default.
131
+
106
132
## Notes
107
133
108
134
- `drift_include_patterns`/ `drift_exclude_patterns` use [doublestar](https://github.com/bmatcuk/doublestar) glob matching against the project directory path.
Default cap on the worker pool Terragrunt uses for dependency loading on each unit during drift detection — equivalent to passing `-parallelism=N`. Must be between `1` and `20`. Applied to every Terragrunt project that does not set its own `drift_terragrunt_parallelism` (project-level overrides block-level overrides this top-level default). Only takes effect for drift runs; plan/apply are unaffected.
Default AWS role configuration for all generated projects. See [AWS Role Configuration](#aws-role-configuration).
390
394
</ParamField>
@@ -425,6 +429,10 @@ Automatically generate projects from directory structure using the `generate_pro
425
429
Glob patterns matched against the `dir` of each project generated by this block. Matching projects are skipped during drift detection. Evaluated after this block's `drift_include_patterns`.
Caps the worker pool Terragrunt uses for dependency loading on each unit during drift detection — equivalent to passing `-parallelism=N` to Terragrunt. Useful for large estates where unbounded concurrency overwhelms the runner. Must be between `1` and `20`. Only takes effect for drift runs (plan/apply are unaffected) and only when the generated projects are Terragrunt. Overrides the top-level `drift_terragrunt_parallelism` default for this block.
0 commit comments