Merge pull request 'Fix Cloud Run probe ports and LB timeout_sec' (#5) from fix-terraform-probes into main

This commit is contained in:
2026-04-26 05:28:49 +00:00
3 changed files with 32 additions and 10 deletions
+12
View File
@@ -43,6 +43,10 @@ resource "google_cloud_run_v2_service" "accounts_us" {
name = "ENV"
value = "production"
}
env {
name = "ACCOUNTS_PORT"
value = "8080"
}
env {
name = "ACCOUNTS_DATABASE_URL"
value_source {
@@ -183,6 +187,10 @@ resource "google_cloud_run_v2_service" "accounts_eu" {
name = "ENV"
value = "production"
}
env {
name = "ACCOUNTS_PORT"
value = "8080"
}
env {
name = "ACCOUNTS_DATABASE_URL"
value_source {
@@ -321,6 +329,10 @@ resource "google_cloud_run_v2_service" "accounts_apac" {
name = "ENV"
value = "production"
}
env {
name = "ACCOUNTS_PORT"
value = "8080"
}
env {
name = "ACCOUNTS_DATABASE_URL"
value_source {
+18 -6
View File
@@ -42,6 +42,10 @@ resource "google_cloud_run_v2_service" "api_us" {
name = "ENV"
value = "production"
}
env {
name = "SERVER_PORT"
value = "8080"
}
env {
name = "ACCOUNTS_SERVICE_URL"
value = "https://accounts.neurontechnologies.ai"
@@ -73,7 +77,7 @@ resource "google_cloud_run_v2_service" "api_us" {
startup_probe {
http_get {
path = "/health"
path = "/actuator/health"
port = 8080
}
initial_delay_seconds = 2
@@ -84,7 +88,7 @@ resource "google_cloud_run_v2_service" "api_us" {
liveness_probe {
http_get {
path = "/health"
path = "/actuator/health"
port = 8080
}
timeout_seconds = 5
@@ -139,6 +143,10 @@ resource "google_cloud_run_v2_service" "api_eu" {
name = "ENV"
value = "production"
}
env {
name = "SERVER_PORT"
value = "8080"
}
env {
name = "ACCOUNTS_SERVICE_URL"
value = "https://accounts.neurontechnologies.ai"
@@ -170,7 +178,7 @@ resource "google_cloud_run_v2_service" "api_eu" {
startup_probe {
http_get {
path = "/health"
path = "/actuator/health"
port = 8080
}
initial_delay_seconds = 2
@@ -181,7 +189,7 @@ resource "google_cloud_run_v2_service" "api_eu" {
liveness_probe {
http_get {
path = "/health"
path = "/actuator/health"
port = 8080
}
timeout_seconds = 5
@@ -233,6 +241,10 @@ resource "google_cloud_run_v2_service" "api_apac" {
name = "ENV"
value = "production"
}
env {
name = "SERVER_PORT"
value = "8080"
}
env {
name = "ACCOUNTS_SERVICE_URL"
value = "https://accounts.neurontechnologies.ai"
@@ -264,7 +276,7 @@ resource "google_cloud_run_v2_service" "api_apac" {
startup_probe {
http_get {
path = "/health"
path = "/actuator/health"
port = 8080
}
initial_delay_seconds = 2
@@ -275,7 +287,7 @@ resource "google_cloud_run_v2_service" "api_apac" {
liveness_probe {
http_get {
path = "/health"
path = "/actuator/health"
port = 8080
}
timeout_seconds = 5
+2 -4
View File
@@ -57,8 +57,7 @@ resource "google_compute_backend_service" "accounts" {
project = var.project_id
load_balancing_scheme = "EXTERNAL_MANAGED"
protocol = "HTTPS"
timeout_sec = 30
# timeout_sec not supported for serverless NEG backends
security_policy = google_compute_security_policy.marketing.self_link
# No CDN for accounts responses are user-specific and must not be cached
@@ -81,8 +80,7 @@ resource "google_compute_backend_service" "api" {
project = var.project_id
load_balancing_scheme = "EXTERNAL_MANAGED"
protocol = "HTTPS"
timeout_sec = 60 # API calls may be longer (AI inference routing)
# timeout_sec not supported for serverless NEG backends
security_policy = google_compute_security_policy.marketing.self_link
enable_cdn = false # API responses are per-request; no CDN benefit