Allow to not use any health check

Internet / serverless NEGs (Cloud Run) don't use them and it's an error to add one in their backend services.
This commit is contained in:
Julio Diez 2023-02-24 09:55:26 +01:00 committed by GitHub
parent 89da766801
commit 08ba94aebc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -46,7 +46,7 @@ resource "google_compute_region_backend_service" "default" {
description = var.description
affinity_cookie_ttl_sec = each.value.affinity_cookie_ttl_sec
connection_draining_timeout_sec = each.value.connection_draining_timeout_sec
health_checks = [
health_checks = length(each.value.health_checks) == 0 ? null : [
for k in each.value.health_checks : lookup(local.hc_ids, k, k)
] # not for internet / serverless NEGs
locality_lb_policy = each.value.locality_lb_policy