Skip to content

Instantly share code, notes, and snippets.

@cdennig
Last active August 18, 2017 09:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cdennig/49f652d96f14166833b8d93c76bd85db to your computer and use it in GitHub Desktop.
Save cdennig/49f652d96f14166833b8d93c76bd85db to your computer and use it in GitHub Desktop.
Azure WebApp Slot
{
"name": "[concat(variables('apiSiteName'), '/staging')]",
"type": "Microsoft.Web/sites/slots",
"location": "[resourceGroup().location]",
"apiVersion": "2015-08-01",
"dependsOn": [
"[resourceId('Microsoft.Web/Sites', variables('apiSiteName'))]"
],
"tags": {
"[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('apiHostingPlanName'))]": "Resource",
"displayName": "Slot Web / API"
},
"properties": {
"name": "[concat(variables('apiSiteName'), '(staging)')]",
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms/', parameters('apiHostingPlanName'))]",
"clientAffinityEnabled": false
},
"resources": [{
"apiVersion": "2015-08-01",
"name": "connectionstrings",
"type": "config",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.Web/Sites/', variables('apiSiteName'), '/slots/staging')]"
],
"properties": {
"masterdata": {
"value": "[concat('Data Source=tcp:', reference(resourceId('Microsoft.Sql/servers/', variables('sqlserverName'))).fullyQualifiedDomainName, ',1433;Initial Catalog=', parameters('databaseName'), ';User Id=', parameters('administratorLogin'), '@', variables('sqlserverName'), ';Password=', parameters('administratorLoginPassword'), ';')]",
"type": "SQLServer"
},
"redis": {
"value": "[concat(reference(resourceId('Microsoft.Cache/Redis', variables('RedisCache').Name)).hostName, variables('RedisCache').WebAppRedisSettingText, listKeys(resourceId('Microsoft.Cache/Redis', variables('RedisCache').Name), '2015-08-01').primaryKey)]",
"type": "Custom"
}
}
},
{
"apiVersion": "2015-08-01",
"type": "config",
"name": "web",
"dependsOn": [
"[concat('Microsoft.Web/Sites/', variables('apiSiteName'), '/slots/staging')]"
],
"properties": {
"use32BitWorkerProcess": false,
"alwaysOn": true,
"phpVersion": "",
"defaultDocuments": []
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment