Unable to use "TCP" health check with http load balancer
asamey opened this issue · 1 comments
asamey commented
cannot use TCP health check for http load balancer.
Terraform Resources
resource "google_compute_health_check" "default" {
provider = google-beta
for_each = local.health_checked_backends
project = var.project
name = "${var.name}-hc-${each.key}"
check_interval_sec = lookup(each.value["health_check"], "check_interval_sec", 5)
timeout_sec = lookup(each.value["health_check"], "timeout_sec", 5)
healthy_threshold = lookup(each.value["health_check"], "healthy_threshold", 2)
unhealthy_threshold = lookup(each.value["health_check"], "unhealthy_threshold", 2)
log_config {
enable = lookup(each.value["health_check"], "logging", false)
}
dynamic "http_health_check" {
for_each = each.value["protocol"] == "HTTP" ? [
{
host = lookup(each.value["health_check"], "host", null)
request_path = lookup(each.value["health_check"], "request_path", null)
port = lookup(each.value["health_check"], "port", null)
}
] : []
content {
host = lookup(http_health_check.value, "host", null)
request_path = lookup(http_health_check.value, "request_path", null)
port = lookup(http_health_check.value, "port", null)
}
}
dynamic "https_health_check" {
for_each = each.value["protocol"] == "HTTPS" ? [
{
host = lookup(each.value["health_check"], "host", null)
request_path = lookup(each.value["health_check"], "request_path", null)
port = lookup(each.value["health_check"], "port", null)
}
] : []
content {
host = lookup(https_health_check.value, "host", null)
request_path = lookup(https_health_check.value, "request_path", null)
port = lookup(https_health_check.value, "port", null)
}
}
dynamic "http2_health_check" {
for_each = each.value["protocol"] == "HTTP2" ? [
{
host = lookup(each.value["health_check"], "host", null)
request_path = lookup(each.value["health_check"], "request_path", null)
port = lookup(each.value["health_check"], "port", null)
}
] : []
content {
host = lookup(http2_health_check.value, "host", null)
request_path = lookup(http2_health_check.value, "request_path", null)
port = lookup(http2_health_check.value, "port", null)
}
}
}
Detailed design
No response
Additional information
No response
github-actions commented
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days