Skip to content

Commit bbb4a62

Browse files
committed
Add sticky sessions configuration for UI test consistency in container app to avoid double login deadlocks
1 parent 511dece commit bbb4a62

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

terraform/staging/main.tf

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,23 @@ resource "azurerm_container_app" "staging" {
5050
}
5151
}
5252
}
53+
}
54+
55+
# Patch Sticky sessions for UI test consistency
56+
resource "azapi_update_resource" "sticky_session_staging" {
57+
type = "Microsoft.App/containerApps@2024-03-01"
58+
resource_id = azurerm_container_app.staging.id
59+
body = {
60+
properties = {
61+
configuration = {
62+
ingress = {
63+
stickySessions = {
64+
affinity = "sticky"
65+
}
66+
}
67+
}
68+
}
69+
}
70+
71+
depends_on = [azurerm_container_app.staging]
5372
}

terraform/staging/providers.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ terraform {
66
azurerm = {
77
source = "hashicorp/azurerm"
88
}
9+
azapi = {
10+
source = "Azure/azapi"
11+
version = "~>2.0"
12+
}
913
}
1014
backend "azurerm" {
1115
resource_group_name = "tsvi-rg"

0 commit comments

Comments
 (0)