Skip to content

Commit ffe8aaf

Browse files
committed
PR changes
1 parent 2fdcd65 commit ffe8aaf

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

infrastructure/modules/container-app/main.tf

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,10 @@ resource "azurerm_container_app" "main" {
110110
content {
111111
transport = "HTTP"
112112
path = var.probe_path
113-
port = local.effective_liveness_port
114-
initial_delay = 45
115-
interval_seconds = 10
113+
port = var.exposed_port != null ? var.exposed_port : var.port
114+
interval_seconds = 5
116115
timeout = 2
117-
failure_count_threshold = 4
116+
failure_count_threshold = 2
118117
}
119118
}
120119
}

infrastructure/modules/container-app/variables.tf

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,6 @@ variable "exposed_port" {
9393
default = null
9494
}
9595

96-
variable "liveness_probe_port" {
97-
description = "Port for the liveness probe to check. Default is var.port."
98-
type = number
99-
default = null
100-
}
101-
10296
variable "memory" {
10397
description = "Memory allocated to the app (GiB). Also dictates the CPU allocation: CPU(%)=MEMORY(Gi)/2. Maximum: 4Gi"
10498
default = "0.5"
@@ -215,6 +209,5 @@ locals {
215209
PT12H = "PT5M"
216210
}
217211
alert_frequency = local.alert_frequency_map[var.alert_window_size]
218-
probe_enabled = var.probe_path != null
219-
effective_liveness_port = var.liveness_probe_port != null ? var.liveness_probe_port : var.port
212+
probe_enabled = var.probe_path != null && var.is_web_app
220213
}

0 commit comments

Comments
 (0)