1

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 Answer 1

1

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).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.