diff --git a/network_services_tcp_route_actions/main.tf b/network_services_tcp_route_actions/main.tf index 8ab9f61d..3a339b32 100644 --- a/network_services_tcp_route_actions/main.tf +++ b/network_services_tcp_route_actions/main.tf @@ -1,13 +1,15 @@ resource "google_compute_backend_service" "default" { - name = "my-backend-service-${local.name_suffix}" - health_checks = [google_compute_http_health_check.default.id] + name = "my-backend-service-${local.name_suffix}" + load_balancing_scheme = "INTERNAL_SELF_MANAGED" + health_checks = [google_compute_health_check.default.id] } -resource "google_compute_http_health_check" "default" { - name = "backend-service-health-check-${local.name_suffix}" - request_path = "/" - check_interval_sec = 1 - timeout_sec = 1 +resource "google_compute_health_check" "default" { + name = "backend-service-health-check-${local.name_suffix}" + + tcp_health_check { + port = 80 + } } resource "google_network_services_tcp_route" "default" { diff --git a/network_services_tcp_route_basic/main.tf b/network_services_tcp_route_basic/main.tf index 7226ccb1..0717625d 100644 --- a/network_services_tcp_route_basic/main.tf +++ b/network_services_tcp_route_basic/main.tf @@ -1,13 +1,15 @@ resource "google_compute_backend_service" "default" { - name = "my-backend-service-${local.name_suffix}" - health_checks = [google_compute_http_health_check.default.id] + name = "my-backend-service-${local.name_suffix}" + load_balancing_scheme = "INTERNAL_SELF_MANAGED" + health_checks = [google_compute_health_check.default.id] } -resource "google_compute_http_health_check" "default" { - name = "backend-service-health-check-${local.name_suffix}" - request_path = "/" - check_interval_sec = 1 - timeout_sec = 1 +resource "google_compute_health_check" "default" { + name = "backend-service-health-check-${local.name_suffix}" + + tcp_health_check { + port = 80 + } } resource "google_network_services_tcp_route" "default" { diff --git a/network_services_tcp_route_gateway_basic/main.tf b/network_services_tcp_route_gateway_basic/main.tf index b3c021a8..0ba46ad7 100644 --- a/network_services_tcp_route_gateway_basic/main.tf +++ b/network_services_tcp_route_gateway_basic/main.tf @@ -1,13 +1,15 @@ resource "google_compute_backend_service" "default" { - name = "my-backend-service-${local.name_suffix}" - health_checks = [google_compute_http_health_check.default.id] + name = "my-backend-service-${local.name_suffix}" + load_balancing_scheme = "INTERNAL_SELF_MANAGED" + health_checks = [google_compute_health_check.default.id] } -resource "google_compute_http_health_check" "default" { - name = "backend-service-health-check-${local.name_suffix}" - request_path = "/" - check_interval_sec = 1 - timeout_sec = 1 +resource "google_compute_health_check" "default" { + name = "backend-service-health-check-${local.name_suffix}" + + tcp_health_check { + port = 80 + } } resource "google_network_services_gateway" "default" { diff --git a/network_services_tcp_route_mesh_basic/main.tf b/network_services_tcp_route_mesh_basic/main.tf index edfd647f..7fb0da93 100644 --- a/network_services_tcp_route_mesh_basic/main.tf +++ b/network_services_tcp_route_mesh_basic/main.tf @@ -1,13 +1,15 @@ resource "google_compute_backend_service" "default" { - name = "my-backend-service-${local.name_suffix}" - health_checks = [google_compute_http_health_check.default.id] + name = "my-backend-service-${local.name_suffix}" + load_balancing_scheme = "INTERNAL_SELF_MANAGED" + health_checks = [google_compute_health_check.default.id] } -resource "google_compute_http_health_check" "default" { - name = "backend-service-health-check-${local.name_suffix}" - request_path = "/" - check_interval_sec = 1 - timeout_sec = 1 +resource "google_compute_health_check" "default" { + name = "backend-service-health-check-${local.name_suffix}" + + tcp_health_check { + port = 80 + } } resource "google_network_services_mesh" "default" {