diff --git a/nsxt/resource_nsxt_policy_gateway_prefix_list.go b/nsxt/resource_nsxt_policy_gateway_prefix_list.go index a109f5b7f..96c4cfd15 100644 --- a/nsxt/resource_nsxt_policy_gateway_prefix_list.go +++ b/nsxt/resource_nsxt_policy_gateway_prefix_list.go @@ -90,7 +90,7 @@ func setPrefixesInSchema(d *schema.ResourceData, prefixes []model.PrefixEntry) { elem["action"] = *prefix.Action elem["ge"] = prefix.Ge elem["le"] = prefix.Le - if *prefix.Network == "ANY" { + if *prefix.Network == "ANY" || *prefix.Network == "any" { elem["network"] = "" } else { elem["network"] = prefix.Network diff --git a/nsxt/segment_common.go b/nsxt/segment_common.go index 379b897c3..3793b1158 100644 --- a/nsxt/segment_common.go +++ b/nsxt/segment_common.go @@ -1320,7 +1320,10 @@ func nsxtPolicySegmentRead(d *schema.ResourceData, m interface{}, isVlan bool, i // This is a list with 1 element var advConfigList []map[string]interface{} advConfigList = append(advConfigList, advConfig) - d.Set("advanced_config", advConfigList) + userConfig := d.Get("advanced_config").([]interface{}) + if len(userConfig) > 0 { + d.Set("advanced_config", advConfigList) + } } if obj.L2Extension != nil {