From c198db3a7d1eb07cfeb2845ac518a54ab0951900 Mon Sep 17 00:00:00 2001 From: Miles Yucht Date: Wed, 25 Oct 2023 16:51:51 +0200 Subject: [PATCH] also check basic type --- common/reflect_resource.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/reflect_resource.go b/common/reflect_resource.go index 7201aa7ad9..c45dd09d54 100644 --- a/common/reflect_resource.go +++ b/common/reflect_resource.go @@ -475,7 +475,7 @@ func StructToData(result any, s map[string]*schema.Schema, d *schema.ResourceDat // If the ForceSendFields field is present, and the field is not in the list, and its value // is the zero value, then the server did not respond with this field, so it should not be set // in the resource data. - if hasForceSendFields && !slices.Contains(forceSendFields, fieldPath) && valueField.IsZero() { + if hasForceSendFields && isBasicType(fieldSchema.Type) && !slices.Contains(forceSendFields, fieldPath) && valueField.IsZero() { log.Printf("[TRACE] Skipping field %s because it is not in ForceSendFields and is zero value", fieldPath) return nil }