diff --git a/internal/builtin/providers/terraform/resource_data.go b/internal/builtin/providers/terraform/resource_data.go index 91a2a68794..eb39f3ed66 100644 --- a/internal/builtin/providers/terraform/resource_data.go +++ b/internal/builtin/providers/terraform/resource_data.go @@ -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()) }