feat(net-lb-app-int): support regional health checks (#3939)

Introduce support for regional health checks in the net-lb-app-int module while maintaining backward compatibility.

Added optional is_regional flag to health_check_configs (defaulting to false). When true, it creates google_compute_region_health_check instead of google_compute_health_check.

Updated backend services and outputs to merge both global and regional health check IDs. Added a new test case to verify regional health check functionality.

TAG=agy

CONV=6aff620c-e5a5-44eb-afe0-459cff820daa
This commit is contained in:
Ludovico Magnocavallo
2026-05-06 17:33:20 +02:00
committed by GitHub
parent 6c9ed94602
commit 30b9d4c74f
8 changed files with 175 additions and 14 deletions

View File

@@ -0,0 +1,32 @@
/**
* Copyright 2026 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
backend_service_configs = {
default = {
backends = [{
group = "projects/myprj/zones/europe-west1-a/instanceGroups/my-ig"
}]
health_checks = ["regional"]
}
}
health_check_configs = {
regional = {
is_regional = true
tcp = {
port_specification = "USE_SERVING_PORT"
}
}
}

View File

@@ -0,0 +1,20 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
counts:
google_compute_forwarding_rule: 1
google_compute_region_health_check: 1
google_compute_region_backend_service: 1
google_compute_region_target_http_proxy: 1
google_compute_region_url_map: 1

View File

@@ -25,6 +25,7 @@ tests:
health-checks-http:
health-checks-http2:
health-checks-https:
health-checks-regional:
health-checks-ssl:
health-checks-tcp:
https: