Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add defaults for expr and description to prevent spurious diffs #11656

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/5997.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
compute: fixed extra diffs generated on `google_security_policy` `rules` when modifying a rule
```
2 changes: 2 additions & 0 deletions google/resource_compute_security_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.`,
},
Expand Down Expand Up @@ -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.`,
},
Expand Down