mirror of
https://github.com/puppetmaster/typhoon.git
synced 2024-12-26 17:49:32 +01:00
8da17fb7a2
If no region is set at the Google provider level, Terraform fails to create the google_compute_target_pool.workers resource and complains with "Cannot determine region: set in this resource, or set provider-level 'region' or 'zone'." This commit fixes the issue by explicitly setting the region for the google_compute_target_pool.workers resource.
23 lines
759 B
HCL
23 lines
759 B
HCL
# Target pool for TCP/UDP load balancing
|
|
resource "google_compute_target_pool" "workers" {
|
|
name = "${var.name}-worker-pool"
|
|
region = "${var.region}"
|
|
session_affinity = "NONE"
|
|
|
|
health_checks = [
|
|
"${google_compute_http_health_check.workers.name}",
|
|
]
|
|
}
|
|
|
|
# HTTP Health Check (for TCP/UDP load balancing)
|
|
# Forward rules (regional) to target pools don't support different external
|
|
# and internal ports. Health check for nodes with Ingress controllers that
|
|
# may support proxying or otherwise satisfy the check.
|
|
resource "google_compute_http_health_check" "workers" {
|
|
name = "${var.name}-target-pool-health"
|
|
description = "Health check for the worker target pool"
|
|
|
|
port = 10254
|
|
request_path = "/healthz"
|
|
}
|