Skip to content

Commit 78dea0e

Browse files
committed
'DefaultValue' plan modified does not set default value when there is no current value (e.g. resource Create).
1 parent 44e3c21 commit 78dea0e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

internal/generic/default_value_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ func TestDefaultValue(t *testing.T) {
4848
defaultValue: types.String{Value: "alpha"},
4949
expectedValue: types.String{Value: "alpha"},
5050
},
51+
"default string on create": {
52+
plannedValue: types.String{Null: true},
53+
currentValue: types.String{Null: true},
54+
defaultValue: types.String{Value: "alpha"},
55+
expectedValue: types.String{Null: true},
56+
},
5157
"non-default non-Null number": {
5258
plannedValue: types.Number{Value: big.NewFloat(30)},
5359
currentValue: types.Number{Value: big.NewFloat(10)},

0 commit comments

Comments
 (0)