{ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { "siteName": { "type": "string", "metadata": { "description": "The name of the web app that you wish to create." } }, "hostingPlanName": { "type": "string", "metadata": { "description": "The name of the App Service plan to use for hosting the web app." } }, "sku": { "type": "string", "allowedValues": [ "F1", "D1", "B1", "B2", "B3", "S1" ], "defaultValue": "F1", "metadata": { "description": "The pricing tier for the hosting plan." } }, "repoURL": { "type": "string", "defaultValue": "https://github.com/Azure-Samples/azure-event-grid-viewer.git", "metadata": { "description": "The URL for the GitHub repository that contains the project to deploy." } }, "branch": { "type": "string", "defaultValue": "master", "metadata": { "description": "The branch of the GitHub repository to use." } }, "location": { "type": "string", "defaultValue": "[resourceGroup().location]", "metadata": { "description": "Location for all resources." } } }, "resources": [ { "apiVersion": "2015-08-01", "name": "[parameters('hostingPlanName')]", "type": "Microsoft.Web/serverfarms", "location": "[parameters('location')]", "sku": { "name": "[parameters('sku')]", "capacity": 0 }, "properties": { "name": "[parameters('hostingPlanName')]" } }, { "apiVersion": "2015-08-01", "name": "[parameters('siteName')]", "type": "Microsoft.Web/sites", "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Web/serverfarms', parameters('hostingPlanName'))]" ], "properties": { "serverFarmId": "[parameters('hostingPlanName')]", "siteConfig": { "webSocketsEnabled": true }, "httpsOnly":true }, "resources": [ { "apiVersion": "2018-11-01", "name": "web", "type": "sourcecontrols", "dependsOn": [ "[resourceId('Microsoft.Web/Sites', parameters('siteName'))]" ], "properties": { "RepoUrl": "[parameters('repoURL')]", "branch": "[parameters('branch')]", "IsManualIntegration": true } } ] } ], "outputs": { "appServiceEndpoint": { "type": "string", "value": "[concat('https://',reference(resourceId('Microsoft.Web/sites', parameters('siteName'))).hostNames[0])]" } } }