Skip to content

Commit 0f5011a

Browse files
update code
1 parent 57b7d93 commit 0f5011a

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

infra/avm/main.bicep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1236,7 +1236,7 @@ module containerApp './modules/compute/container-app.bicep' = {
12361236
module containerAppMcp './modules/compute/container-app.bicep' = {
12371237
name: take('module.container-app-mcp.${solutionName}', 64)
12381238
params: {
1239-
enableSessionAffinity : enableScalability? true: false
1239+
stickySessionsAffinity : enableScalability? 'sticky': 'none'
12401240
name: 'ca-mcp-${solutionSuffix}'
12411241
location: location
12421242
tags: tags

infra/avm/modules/compute/container-app.bicep

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,12 @@ param workloadProfileName string?
6262
@description('Enable Azure telemetry collection.')
6363
param enableTelemetry bool = true
6464

65-
@description('Enable sticky session affinity.')
66-
param enableSessionAffinity bool = false
65+
@allowed([
66+
'none'
67+
'sticky'
68+
])
69+
@description('Optional. Bool indicating if the Container App should enable session affinity.')
70+
param stickySessionsAffinity string = 'none'
6771

6872
// ============================================================================
6973
// Container App (AVM)
@@ -77,7 +81,6 @@ module containerApp 'br/public:avm/res/app/container-app:0.22.1' = {
7781
enableTelemetry: enableTelemetry
7882
environmentResourceId: environmentResourceId
7983
containers: containers
80-
stickySessionsAffinity: enableSessionAffinity? 'sticky': 'none'
8184
ingressExternal: disableIngress ? false : ingressExternal
8285
ingressTargetPort: ingressTargetPort
8386
ingressTransport: ingressTransport
@@ -90,6 +93,7 @@ module containerApp 'br/public:avm/res/app/container-app:0.22.1' = {
9093
activeRevisionsMode: activeRevisionsMode
9194
scaleSettings: scaleSettings
9295
workloadProfileName: workloadProfileName
96+
stickySessionsAffinity: stickySessionsAffinity
9397
}
9498
}
9599

0 commit comments

Comments
 (0)