diff --git a/infra/avm/main.bicep b/infra/avm/main.bicep index 2265086ca..c2fbd4078 100644 --- a/infra/avm/main.bicep +++ b/infra/avm/main.bicep @@ -1236,6 +1236,7 @@ module containerApp './modules/compute/container-app.bicep' = { module containerAppMcp './modules/compute/container-app.bicep' = { name: take('module.container-app-mcp.${solutionName}', 64) params: { + stickySessionsAffinity : enableScalability? 'sticky': 'none' name: 'ca-mcp-${solutionSuffix}' location: location tags: tags diff --git a/infra/avm/main.json b/infra/avm/main.json index 6e447fa51..c58c8a39c 100644 --- a/infra/avm/main.json +++ b/infra/avm/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.44.1.10279", - "templateHash": "8714866940320286579" + "templateHash": "2099326972124864634" }, "name": "Multi-Agent Custom Automation Engine - AVM", "description": "AVM orchestrator for the Multi-Agent Custom Automation Engine accelerator. Deploys the same logical resources and preserves the same outputs as infra\\main.bicep using local AVM wrapper modules." @@ -51004,7 +51004,7 @@ "_generator": { "name": "bicep", "version": "0.44.1.10279", - "templateHash": "9906697545075116207" + "templateHash": "10535819316717631477" } }, "parameters": { @@ -51142,6 +51142,17 @@ "metadata": { "description": "Enable Azure telemetry collection." } + }, + "stickySessionsAffinity": { + "type": "string", + "defaultValue": "none", + "allowedValues": [ + "none", + "sticky" + ], + "metadata": { + "description": "Optional. Bool indicating if the Container App should enable session affinity." + } } }, "resources": { @@ -51202,6 +51213,9 @@ }, "workloadProfileName": { "value": "[parameters('workloadProfileName')]" + }, + "stickySessionsAffinity": { + "value": "[parameters('stickySessionsAffinity')]" } }, "template": { @@ -52788,6 +52802,7 @@ }, "mode": "Incremental", "parameters": { + "stickySessionsAffinity": "[if(parameters('enableScalability'), createObject('value', 'sticky'), createObject('value', 'none'))]", "name": { "value": "[format('ca-mcp-{0}', variables('solutionSuffix'))]" }, @@ -52920,7 +52935,7 @@ "_generator": { "name": "bicep", "version": "0.44.1.10279", - "templateHash": "9906697545075116207" + "templateHash": "10535819316717631477" } }, "parameters": { @@ -53058,6 +53073,17 @@ "metadata": { "description": "Enable Azure telemetry collection." } + }, + "stickySessionsAffinity": { + "type": "string", + "defaultValue": "none", + "allowedValues": [ + "none", + "sticky" + ], + "metadata": { + "description": "Optional. Bool indicating if the Container App should enable session affinity." + } } }, "resources": { @@ -53118,6 +53144,9 @@ }, "workloadProfileName": { "value": "[parameters('workloadProfileName')]" + }, + "stickySessionsAffinity": { + "value": "[parameters('stickySessionsAffinity')]" } }, "template": { diff --git a/infra/avm/modules/compute/container-app.bicep b/infra/avm/modules/compute/container-app.bicep index 07e7b4f9e..f40edf904 100644 --- a/infra/avm/modules/compute/container-app.bicep +++ b/infra/avm/modules/compute/container-app.bicep @@ -62,6 +62,13 @@ param workloadProfileName string? @description('Enable Azure telemetry collection.') param enableTelemetry bool = true +@allowed([ + 'none' + 'sticky' +]) +@description('Optional. Bool indicating if the Container App should enable session affinity.') +param stickySessionsAffinity string = 'none' + // ============================================================================ // Container App (AVM) // ============================================================================ @@ -86,6 +93,7 @@ module containerApp 'br/public:avm/res/app/container-app:0.22.1' = { activeRevisionsMode: activeRevisionsMode scaleSettings: scaleSettings workloadProfileName: workloadProfileName + stickySessionsAffinity: stickySessionsAffinity } }