4

I'm having trouble finding information/guides on adding slots to WebApps programmatically, using Resource Manager templates. I've got my base configuration working well, creating the WebApp itself, SQL server, SQL DB etc., but I'm keen to get the slots done too so I can utilise them for dev/test builds.

Does anyone know of any good resources for this?

James
  • 1,028
  • 9
  • 20

2 Answers2

5

I am using the following ARM template to provision Deployment Slots for Azure App Service:

{
    "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {
        "siteName": {
            "type": "string"
        },
        "slotName": {
            "type": "string"
        }
    },
    "resources": [
        {
            "apiVersion": "2015-04-01",
            "type": "Microsoft.Web/Sites/Slots",
            "name": "[concat(parameters('siteName'), '/', parameters('slotName'))]",
            "location": "[resourceGroup().location]",
            "properties": {},
            "resources": []
        }
    ]
}

Hope this helps.

Michal Cumpl
  • 997
  • 7
  • 12
4

I found these templates out on GitHub

Also - have you seen or used the Azure Resource Manager Visualizer? Great resource as well http://armviz.io/#/

jdruid
  • 613
  • 2
  • 8
  • 17