simplify output assignment

This commit is contained in:
James Bardin 2023-01-13 13:20:25 -05:00
parent e2a6397a06
commit e09b67bebd

View File

@ -76,7 +76,7 @@ func planDataStoreResourceChange(req providers.PlanResourceChangeRequest) (resp
// Output type must always match the input, even when it's null.
if input.IsNull() {
planned["output"] = cty.NullVal(input.Type())
planned["output"] = input
} else {
planned["output"] = cty.UnknownVal(input.Type())
}
@ -92,7 +92,7 @@ func planDataStoreResourceChange(req providers.PlanResourceChangeRequest) (resp
// We need to check the input for the replacement instance to compute a
// new output.
if input.IsNull() {
planned["output"] = cty.NullVal(input.Type())
planned["output"] = input
} else {
planned["output"] = cty.UnknownVal(input.Type())
}