diff --git a/.changelog/5997.txt b/.changelog/5997.txt new file mode 100644 index 00000000000..ebe2bef94f7 --- /dev/null +++ b/.changelog/5997.txt @@ -0,0 +1,3 @@ +```release-note:bug +compute: fixed extra diffs generated on `google_security_policy` `rules` when modifying a rule +``` diff --git a/google/resource_compute_security_policy.go b/google/resource_compute_security_policy.go index 9f4f8fcf375..263c143530f 100644 --- a/google/resource_compute_security_policy.go +++ b/google/resource_compute_security_policy.go @@ -106,6 +106,7 @@ func resourceComputeSecurityPolicy() *schema.Resource { "versioned_expr": { Type: schema.TypeString, Optional: true, + Default: "", ValidateFunc: validation.StringInSlice([]string{"SRC_IPS_V1"}, false), Description: `Predefined rule expression. If this field is specified, config must also be specified. Available options: SRC_IPS_V1: Must specify the corresponding src_ip_ranges field in config.`, }, @@ -145,6 +146,7 @@ func resourceComputeSecurityPolicy() *schema.Resource { "description": { Type: schema.TypeString, + Default: "", Optional: true, Description: `An optional description of this rule. Max size is 64.`, },