diff --git a/internal/terraform/node_resource_abstract_instance.go b/internal/terraform/node_resource_abstract_instance.go index 3cab2b181..b7b781191 100644 --- a/internal/terraform/node_resource_abstract_instance.go +++ b/internal/terraform/node_resource_abstract_instance.go @@ -1289,10 +1289,15 @@ func processIgnoreChangesIndividual(prior, config cty.Value, ignoreChangesPath [ } var newVal cty.Value - if len(configMap) == 0 { - newVal = cty.MapValEmpty(v.Type().ElementType()) - } else { + switch { + case len(configMap) > 0: newVal = cty.MapVal(configMap) + case v.IsNull(): + // if the config value was null, and no values remain in the map, + // reset the value to null. + newVal = v + default: + newVal = cty.MapValEmpty(v.Type().ElementType()) } if len(vMarks) > 0 {