Merge pull request 'Fix Cloud Run probe ports and LB timeout_sec' (#5) from fix-terraform-probes into main
This commit is contained in:
@@ -43,6 +43,10 @@ resource "google_cloud_run_v2_service" "accounts_us" {
|
|||||||
name = "ENV"
|
name = "ENV"
|
||||||
value = "production"
|
value = "production"
|
||||||
}
|
}
|
||||||
|
env {
|
||||||
|
name = "ACCOUNTS_PORT"
|
||||||
|
value = "8080"
|
||||||
|
}
|
||||||
env {
|
env {
|
||||||
name = "ACCOUNTS_DATABASE_URL"
|
name = "ACCOUNTS_DATABASE_URL"
|
||||||
value_source {
|
value_source {
|
||||||
@@ -183,6 +187,10 @@ resource "google_cloud_run_v2_service" "accounts_eu" {
|
|||||||
name = "ENV"
|
name = "ENV"
|
||||||
value = "production"
|
value = "production"
|
||||||
}
|
}
|
||||||
|
env {
|
||||||
|
name = "ACCOUNTS_PORT"
|
||||||
|
value = "8080"
|
||||||
|
}
|
||||||
env {
|
env {
|
||||||
name = "ACCOUNTS_DATABASE_URL"
|
name = "ACCOUNTS_DATABASE_URL"
|
||||||
value_source {
|
value_source {
|
||||||
@@ -321,6 +329,10 @@ resource "google_cloud_run_v2_service" "accounts_apac" {
|
|||||||
name = "ENV"
|
name = "ENV"
|
||||||
value = "production"
|
value = "production"
|
||||||
}
|
}
|
||||||
|
env {
|
||||||
|
name = "ACCOUNTS_PORT"
|
||||||
|
value = "8080"
|
||||||
|
}
|
||||||
env {
|
env {
|
||||||
name = "ACCOUNTS_DATABASE_URL"
|
name = "ACCOUNTS_DATABASE_URL"
|
||||||
value_source {
|
value_source {
|
||||||
|
|||||||
@@ -42,6 +42,10 @@ resource "google_cloud_run_v2_service" "api_us" {
|
|||||||
name = "ENV"
|
name = "ENV"
|
||||||
value = "production"
|
value = "production"
|
||||||
}
|
}
|
||||||
|
env {
|
||||||
|
name = "SERVER_PORT"
|
||||||
|
value = "8080"
|
||||||
|
}
|
||||||
env {
|
env {
|
||||||
name = "ACCOUNTS_SERVICE_URL"
|
name = "ACCOUNTS_SERVICE_URL"
|
||||||
value = "https://accounts.neurontechnologies.ai"
|
value = "https://accounts.neurontechnologies.ai"
|
||||||
@@ -73,7 +77,7 @@ resource "google_cloud_run_v2_service" "api_us" {
|
|||||||
|
|
||||||
startup_probe {
|
startup_probe {
|
||||||
http_get {
|
http_get {
|
||||||
path = "/health"
|
path = "/actuator/health"
|
||||||
port = 8080
|
port = 8080
|
||||||
}
|
}
|
||||||
initial_delay_seconds = 2
|
initial_delay_seconds = 2
|
||||||
@@ -84,7 +88,7 @@ resource "google_cloud_run_v2_service" "api_us" {
|
|||||||
|
|
||||||
liveness_probe {
|
liveness_probe {
|
||||||
http_get {
|
http_get {
|
||||||
path = "/health"
|
path = "/actuator/health"
|
||||||
port = 8080
|
port = 8080
|
||||||
}
|
}
|
||||||
timeout_seconds = 5
|
timeout_seconds = 5
|
||||||
@@ -139,6 +143,10 @@ resource "google_cloud_run_v2_service" "api_eu" {
|
|||||||
name = "ENV"
|
name = "ENV"
|
||||||
value = "production"
|
value = "production"
|
||||||
}
|
}
|
||||||
|
env {
|
||||||
|
name = "SERVER_PORT"
|
||||||
|
value = "8080"
|
||||||
|
}
|
||||||
env {
|
env {
|
||||||
name = "ACCOUNTS_SERVICE_URL"
|
name = "ACCOUNTS_SERVICE_URL"
|
||||||
value = "https://accounts.neurontechnologies.ai"
|
value = "https://accounts.neurontechnologies.ai"
|
||||||
@@ -170,7 +178,7 @@ resource "google_cloud_run_v2_service" "api_eu" {
|
|||||||
|
|
||||||
startup_probe {
|
startup_probe {
|
||||||
http_get {
|
http_get {
|
||||||
path = "/health"
|
path = "/actuator/health"
|
||||||
port = 8080
|
port = 8080
|
||||||
}
|
}
|
||||||
initial_delay_seconds = 2
|
initial_delay_seconds = 2
|
||||||
@@ -181,7 +189,7 @@ resource "google_cloud_run_v2_service" "api_eu" {
|
|||||||
|
|
||||||
liveness_probe {
|
liveness_probe {
|
||||||
http_get {
|
http_get {
|
||||||
path = "/health"
|
path = "/actuator/health"
|
||||||
port = 8080
|
port = 8080
|
||||||
}
|
}
|
||||||
timeout_seconds = 5
|
timeout_seconds = 5
|
||||||
@@ -233,6 +241,10 @@ resource "google_cloud_run_v2_service" "api_apac" {
|
|||||||
name = "ENV"
|
name = "ENV"
|
||||||
value = "production"
|
value = "production"
|
||||||
}
|
}
|
||||||
|
env {
|
||||||
|
name = "SERVER_PORT"
|
||||||
|
value = "8080"
|
||||||
|
}
|
||||||
env {
|
env {
|
||||||
name = "ACCOUNTS_SERVICE_URL"
|
name = "ACCOUNTS_SERVICE_URL"
|
||||||
value = "https://accounts.neurontechnologies.ai"
|
value = "https://accounts.neurontechnologies.ai"
|
||||||
@@ -264,7 +276,7 @@ resource "google_cloud_run_v2_service" "api_apac" {
|
|||||||
|
|
||||||
startup_probe {
|
startup_probe {
|
||||||
http_get {
|
http_get {
|
||||||
path = "/health"
|
path = "/actuator/health"
|
||||||
port = 8080
|
port = 8080
|
||||||
}
|
}
|
||||||
initial_delay_seconds = 2
|
initial_delay_seconds = 2
|
||||||
@@ -275,7 +287,7 @@ resource "google_cloud_run_v2_service" "api_apac" {
|
|||||||
|
|
||||||
liveness_probe {
|
liveness_probe {
|
||||||
http_get {
|
http_get {
|
||||||
path = "/health"
|
path = "/actuator/health"
|
||||||
port = 8080
|
port = 8080
|
||||||
}
|
}
|
||||||
timeout_seconds = 5
|
timeout_seconds = 5
|
||||||
|
|||||||
@@ -57,8 +57,7 @@ resource "google_compute_backend_service" "accounts" {
|
|||||||
project = var.project_id
|
project = var.project_id
|
||||||
load_balancing_scheme = "EXTERNAL_MANAGED"
|
load_balancing_scheme = "EXTERNAL_MANAGED"
|
||||||
protocol = "HTTPS"
|
protocol = "HTTPS"
|
||||||
timeout_sec = 30
|
# timeout_sec not supported for serverless NEG backends
|
||||||
|
|
||||||
security_policy = google_compute_security_policy.marketing.self_link
|
security_policy = google_compute_security_policy.marketing.self_link
|
||||||
|
|
||||||
# No CDN for accounts — responses are user-specific and must not be cached
|
# 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
|
project = var.project_id
|
||||||
load_balancing_scheme = "EXTERNAL_MANAGED"
|
load_balancing_scheme = "EXTERNAL_MANAGED"
|
||||||
protocol = "HTTPS"
|
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
|
security_policy = google_compute_security_policy.marketing.self_link
|
||||||
|
|
||||||
enable_cdn = false # API responses are per-request; no CDN benefit
|
enable_cdn = false # API responses are per-request; no CDN benefit
|
||||||
|
|||||||
Reference in New Issue
Block a user