Disabling ARR Merge Using the ARM Pattern

I want to configure the "ARR Affinity" application setting to disable a new application service using our ARM template. How to do it?

I cannot find anything about this, which indicates that there is currently no support.

+4
source share
2 answers

You are looking clientAffinityEnabledforproperties

+3
source

The following is a fully tested working ARM pattern that, after a successful deployment, deploys Azure Web App with ARR Affinity with OFF .

: cookie (ARR cookie) - Azure

{
  "$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'))]"
      ]
    }
  ]
}
+3

Source: https://habr.com/ru/post/1668722/


All Articles