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?
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.
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/#/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With