Templates/WebApp.json
{ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { "webAppName": { "type": "string", "defaultValue": "webApp[UID]", "metadata": { "description": "The Web App Name" } }, "webAppLocation": { "type": "string", "defaultValue": "azure[LOCATION]", "metadata": { "description": "Web App Location." } }, "aspName": { "type": "string", "defaultValue": "", "metadata": { "description": "The App Service Plan Name" } }, "aseName": { "type": "string", "defaultValue": "", "metadata": { "description": "Name of the App Service Environment" } }, "aspResourceGroupName": { "type": "string", "defaultValue": "", "metadata": { "description": "Resource Group Name of the App Service Environment" } } }, "variables": { "aspResourceID": "[resourceId(parameters('aspResourceGroupName'), 'Microsoft.Web/serverfarms/', parameters('aspName'))]", "webAppLocation": "[if(empty(parameters('webAppLocation')), resourceGroup().location, parameters('webAppLocation'))]" }, "resources": [ { "apiVersion": "2016-08-01", "type": "Microsoft.Web/sites", "name": "[parameters('webAppName')]", "location": "[variables('webAppLocation')]", "properties": { "name": "[parameters('webAppName')]", "serverFarmId": "[variables('aspResourceID')]", "hostingEnvironment": "[if(empty(parameters('aseName')), json('null'), parameters('aseName'))]" } } ], "outputs": {} } |