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
#### Autoinclude overrides `config_path` set to a `values.*` attribute
7
+
8
+
When a unit source declared `config_path = values.vpc_path` in a `dependency` block and the stack file's `autoinclude` replaced that dependency with a different `config_path`, Terragrunt raised an "Unsupported attribute" error because it tried to evaluate `values.vpc_path` before applying the autoinclude override. The `values` block no longer needed `vpc_path` since the autoinclude provided the path, but the evaluation order meant the error surfaced anyway.
9
+
10
+
Terragrunt now detects dependency blocks overridden by a sibling autoinclude and bypasses their initial decode error, allowing the autoinclude replacement to resolve dependencies cleanly.
// tfInitCommand is the terraform command these autoinclude tests resolve dependency mock outputs against.
@@ -1404,3 +1405,195 @@ inputs = {
1404
1405
assert.Equal(t, "from-autoinclude", parsed.Inputs["vpc_id"], "autoinclude must win for vpc_id")
1405
1406
assert.Equal(t, "10.0.0.0/16", parsed.Inputs["cidr"], "original values.cidr must survive")
1406
1407
}
1408
+
1409
+
// When a unit source references values.vpc_path in a dependency config_path and the autoinclude overrides that entire dependency, the parse must succeed even though values.vpc_path is absent.
// siblingAutoIncludeDepNames extracts dependency block labels from the sibling autoinclude file via a lightweight HCL parse. Returns nil when no autoinclude is registered, the file is absent, or it cannot be parsed.
// WithSkipLabelsOnError silently drops a block whose first label is in the set when its decode fails, instead of propagating the error. This lets callers skip blocks whose attributes are unresolvable because an autoinclude will replace them.
0 commit comments