1
votes

I would like to deploy the web deploy package to the staging slot of a web app using ARM template. I've tried this following template:

"resources": [
    // WebApp
    {
      "apiVersion": "2015-08-01",
      "name": "[parameters('siteName')]",
      "type": "Microsoft.Web/sites",
      "location": "[parameters('siteLocation')]",
      "dependsOn": [

      ],
      "properties": {
        "name": "[parameters('siteName')]",
        "serverFarmId": "[parameters('hostingPlanName')]",
        "siteConfig": {
          "alwaysOn": true
        }
      },
      "resources": [
        {
          "apiVersion": "2015-08-01",
          "name": "Staging",
          "type": "slots",
          "location": "[parameters('siteLocation')]",
          "dependsOn": [
            "[resourceId('Microsoft.Web/Sites', parameters('siteName'))]"
          ],
          "resources": [
            {
              "name": "DeployPackage",
              "type": "extensions",
              "location": "[parameters('siteLocation')]",
              "apiVersion": "2015-08-01",
              "dependsOn": [
                "Staging"
              ],
              "properties": {
                "packageUri": "[parameters('packageURI')]"
              }
            }
          ]
        }
      ]
    }
  ]

Is this currently supported by the ARM templates? What are the alternate ways of deploying to a particular slot?

1

1 Answers

1
votes

The name needs to be MSDeploy instead of DeployPackage. e.g. see a full sample here. In that sample, it's msdeploy for the main site and not for the slot, but it basically looks the same in the slot case (except that it's nested under the slot, as you already have it).