mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
simplify output assignment
This commit is contained in:
parent
e2a6397a06
commit
e09b67bebd
@ -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())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user