diff --git a/helper/plugin/grpc_provider.go b/helper/plugin/grpc_provider.go index 63f41af41..9ee006cbc 100644 --- a/helper/plugin/grpc_provider.go +++ b/helper/plugin/grpc_provider.go @@ -1119,13 +1119,6 @@ func stripSchema(s *schema.Schema) *schema.Schema { func copyMissingValues(dst, src cty.Value) cty.Value { ty := dst.Type() - // In this case the provider set an empty string which was lost in - // conversion. Since src is unknown, there must have been a corresponding - // value set. - if ty == cty.String && dst.IsNull() && !src.IsKnown() { - return cty.StringVal("") - } - if src.IsNull() || !src.IsKnown() || !dst.IsKnown() { return dst } diff --git a/helper/plugin/grpc_provider_test.go b/helper/plugin/grpc_provider_test.go index 4df64cdac..96799b868 100644 --- a/helper/plugin/grpc_provider_test.go +++ b/helper/plugin/grpc_provider_test.go @@ -821,27 +821,6 @@ func TestCopyMissingValues(t *testing.T) { }), }), }, - { - // Recover the lost unknown key, assuming it was set to an empty - // string and lost. - Src: cty.ObjectVal(map[string]cty.Value{ - "map": cty.MapVal(map[string]cty.Value{ - "a": cty.StringVal("a"), - "b": cty.UnknownVal(cty.String), - }), - }), - Dst: cty.ObjectVal(map[string]cty.Value{ - "map": cty.MapVal(map[string]cty.Value{ - "a": cty.StringVal("a"), - }), - }), - Expect: cty.ObjectVal(map[string]cty.Value{ - "map": cty.MapVal(map[string]cty.Value{ - "a": cty.StringVal("a"), - "b": cty.StringVal(""), - }), - }), - }, } { t.Run(fmt.Sprintf("%d", i), func(t *testing.T) { got := copyMissingValues(tc.Dst, tc.Src)