Skip to content

Commit a4e09ba

Browse files
authored
Fix crash in manifest when configuration contains DynamicPseudotyped unknown values. (#2055)
Generate unknown value of the type required by schema, when backfilling unset values during planning.
1 parent 4572e1b commit a4e09ba

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.changelog/2055.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:bug
2+
`resource/kubernetes_manifest`: Fix crash when manifest config contains unknown values of unknown type (DynamicPseudoType)
3+
```

manifest/morph/scaffold.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func DeepUnknown(t tftypes.Type, v tftypes.Value, p *tftypes.AttributePath) (tft
1616
return tftypes.Value{}, fmt.Errorf("type cannot be nil")
1717
}
1818
if !v.IsKnown() {
19-
return v, nil
19+
return tftypes.NewValue(t, tftypes.UnknownValue), nil
2020
}
2121
switch {
2222
case t.Is(tftypes.Object{}):

0 commit comments

Comments
 (0)