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

Make RegionBackendService health checks optional #7433

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/4053.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
compute: Fixed an issue where `google_compute_region_backend_service` required `healthChecks` for a serverless network endpoint group.
```
3 changes: 2 additions & 1 deletion google/resource_compute_backend_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,8 @@ requests.`,
for health checking this BackendService. Currently at most one health
check can be specified.

A health check must be specified unless the backend service uses an internet NEG as a backend.
A health check must be specified unless the backend service uses an internet
or serverless NEG as a backend.

For internal load balancing, a URL to a HealthCheck resource must be specified instead.`,
MinItems: 1,
Expand Down
29 changes: 16 additions & 13 deletions google/resource_compute_region_backend_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,19 +136,6 @@ func resourceComputeRegionBackendService() *schema.Resource {
CustomizeDiff: customDiffRegionBackendService,

Schema: map[string]*schema.Schema{
"health_checks": {
Type: schema.TypeSet,
Required: true,
Description: `The set of URLs to HealthCheck resources for health checking
this RegionBackendService. Currently at most one health
check can be specified, and a health check is required.`,
MinItems: 1,
MaxItems: 1,
Elem: &schema.Schema{
Type: schema.TypeString,
},
Set: selfLinkRelativePathHash,
},
"name": {
Type: schema.TypeString,
Required: true,
Expand Down Expand Up @@ -378,6 +365,22 @@ This field is only used with l4 load balancing.`,
},
},
},
"health_checks": {
Type: schema.TypeSet,
Optional: true,
Description: `The set of URLs to HealthCheck resources for health checking
this RegionBackendService. Currently at most one health
check can be specified.

A health check must be specified unless the backend service uses an internet
or serverless NEG as a backend.`,
MinItems: 1,
MaxItems: 1,
Elem: &schema.Schema{
Type: schema.TypeString,
},
Set: selfLinkRelativePathHash,
},
"load_balancing_scheme": {
Type: schema.TypeString,
Optional: true,
Expand Down
3 changes: 2 additions & 1 deletion website/docs/r/compute_backend_service.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,8 @@ The following arguments are supported:
The set of URLs to the HttpHealthCheck or HttpsHealthCheck resource
for health checking this BackendService. Currently at most one health
check can be specified.
A health check must be specified unless the backend service uses an internet NEG as a backend.
A health check must be specified unless the backend service uses an internet
or serverless NEG as a backend.
For internal load balancing, a URL to a HealthCheck resource must be specified instead.

* `iap` -
Expand Down
14 changes: 8 additions & 6 deletions website/docs/r/compute_region_backend_service.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,6 @@ resource "google_compute_subnetwork" "default" {
The following arguments are supported:


* `health_checks` -
(Required)
The set of URLs to HealthCheck resources for health checking
this RegionBackendService. Currently at most one health
check can be specified, and a health check is required.

* `name` -
(Required)
Name of the resource. Provided by the client when the resource is
Expand Down Expand Up @@ -281,6 +275,14 @@ The following arguments are supported:
Policy for failovers.
Structure is documented below.

* `health_checks` -
(Optional)
The set of URLs to HealthCheck resources for health checking
this RegionBackendService. Currently at most one health
check can be specified.
A health check must be specified unless the backend service uses an internet
or serverless NEG as a backend.

* `load_balancing_scheme` -
(Optional)
Indicates what kind of load balancing this regional backend service
Expand Down