Disabling ARR Affinity using ARM Template
Below is a fully tested working ARM Template which deploy a Azure Web App with "ARR Affinity" set to OFF after deployed successfully.
Useful reference: Disable Session affinity cookie (ARR cookie) for Azure web apps
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"location": {
"type": "string",
"defaultValue": "[resourceGroup().location]"
},
"hostingplan.name": {
"type": "string",
"defaultValue": "[concat(resourceGroup().name, '-hp')]"
},
"webapp.name": {
"type": "string",
"defaultValue": "[resourceGroup().name]"
}
},
"resources": [
{
"type": "Microsoft.Web/serverfarms",
"name": "[parameters('hostingplan.name')]",
"apiVersion": "2016-09-01",
"sku": {
"name": "S1",
"capacity": 1
},
"properties": {
"name": "[parameters('hostingplan.name')]"
},
"location": "[parameters('location')]"
},
{
"type": "Microsoft.Web/sites",
"name": "[parameters('webapp.name')]",
"apiVersion": "2016-08-01",
"properties": {
"clientAffinityEnabled": false,
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', parameters('hostingplan.name'))]"
},
"location": "[parameters('location')]",
"dependsOn": [
"[resourceId('Microsoft.Web/serverfarms', parameters('hostingplan.name'))]"
]
}
]
}
You are looking for clientAffinityEnabled
under properties
of your Microsoft.Web/sites
resource.