Skip to content

Commit 25bf499

Browse files
Add defaults for expr and description to prevent spurious diffs (#5997) (#11656)
* Add defaults for expr and description to prevent spurious diffs * Handwritten instead Signed-off-by: Modular Magician <[email protected]>
1 parent bbab71e commit 25bf499

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

.changelog/5997.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:bug
2+
compute: fixed extra diffs generated on `google_security_policy` `rules` when modifying a rule
3+
```

google/resource_compute_security_policy.go

+2
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ func resourceComputeSecurityPolicy() *schema.Resource {
106106
"versioned_expr": {
107107
Type: schema.TypeString,
108108
Optional: true,
109+
Default: "",
109110
ValidateFunc: validation.StringInSlice([]string{"SRC_IPS_V1"}, false),
110111
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.`,
111112
},
@@ -145,6 +146,7 @@ func resourceComputeSecurityPolicy() *schema.Resource {
145146

146147
"description": {
147148
Type: schema.TypeString,
149+
Default: "",
148150
Optional: true,
149151
Description: `An optional description of this rule. Max size is 64.`,
150152
},

0 commit comments

Comments
 (0)