Skip to content

Commit

Permalink
Make RegionBackendService health checks optional (#4053) (#2547)
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Oct 5, 2020
1 parent 05c81e4 commit d65c4eb
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 21 deletions.
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-beta/resource_compute_backend_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,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-beta/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 @@ -403,6 +390,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

0 comments on commit d65c4eb

Please sign in to comment.