Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
187 lines (187 sloc) 7.53 KB
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"frontDoorHostPrefix": {
"type": "string",
"minLength": 1,
"metadata": {
"description": "The name of the host name for Front Door"
}
},
"webAppName": {
"type": "string",
"minLength": 1,
"metadata": {
"description": "The name of the Web App"
}
},
"webAppSKU": {
"type": "string",
"defaultValue": "Standard",
"allowedValues": [
"Free",
"Shared",
"Basic",
"Standard"
],
"metadata": {
"description": "The Web App pricing tier"
}
},
"workerSize": {
"type": "string",
"defaultValue": "0",
"allowedValues": [
"0",
"1",
"2"
],
"metadata": {
"description": "The Web App worker size"
}
}
},
"variables": {
"Web App Address": "[concat(parameters('webAppName'), '.azurewebsites.net')]",
"Front Door Name": "[parameters('frontDoorHostPrefix')]",
"Main Front End": "main-frontend",
"Main Health Probe Settings": "main-health-probe",
"Main Load Balancing Settings": "main-load-balancing-settings",
"App Service Backend Pool": "app-service-pool"
},
"resources": [
{
"apiVersion": "2014-06-01",
"type": "Microsoft.Web/serverfarms",
"name": "[parameters('webAppName')]",
"location": "[resourceGroup().location]",
"dependsOn": [],
"tags": {},
"properties": {
"name": "[parameters('webAppName')]",
"sku": "[parameters('webAppSKU')]",
"workerSize": "[parameters('workerSize')]",
"numberOfWorkers": 1
}
},
{
"apiVersion": "2015-08-01",
"type": "Microsoft.Web/sites",
"name": "[parameters('webAppName')]",
"location": "[resourceGroup().location]",
"dependsOn": [
"[resourceId('Microsoft.Web/serverfarms', parameters('webAppName'))]"
],
"tags": {},
"properties": {
"name": "[parameters('webAppName')]",
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms/', parameters('webAppName'))]",
"siteConfig": {
"ipSecurityRestrictions": [
{
"name": "frontdoor",
"description": "Let requests coming from frontdoor pass: 147.243.0.0/16",
"ipAddress": "147.243.0.0",
"subnetMask": "255.255.0.0"
}
]
}
},
"resources": []
},
{
"apiVersion": "2019-04-01",
"type": "Microsoft.Network/frontDoors",
"name": "[variables('Front Door Name')]",
"location": "global",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('webAppName'))]"
],
"tags": {},
"properties": {
"friendlyName": "string",
"frontendEndpoints": [
{
"name": "[variables('Main Front End')]",
"properties": {
"hostName": "[concat(parameters('frontDoorHostPrefix'), '.azurefd.net')]",
"sessionAffinityEnabledState": "Disabled",
"sessionAffinityTtlSeconds": 0
}
}
],
"healthProbeSettings": [
{
"name": "[variables('Main Health Probe Settings')]",
"properties": {
"path": "/",
"protocol": "Https",
"intervalInSeconds": 30
}
}
],
"loadBalancingSettings": [
{
"name": "[variables('Main Load Balancing Settings')]",
"properties": {
"sampleSize": 4,
"successfulSamplesRequired": 3,
"additionalLatencyMilliseconds": 0
}
}
],
"backendPools": [
{
"name": "[variables('App Service Backend Pool')]",
"properties": {
"backends": [
{
"address": "[variables('Web App Address')]",
"httpPort": 80,
"httpsPort": 443,
"priority": 1,
"weight": 50,
"backendHostHeader": "[variables('Web App Address')]"
}
],
"loadBalancingSettings": {
"id": "[resourceId('Microsoft.Network/frontDoors/loadBalancingSettings', variables('Front Door Name'), variables('Main Load Balancing Settings'))]"
},
"healthProbeSettings": {
"id": "[resourceId('Microsoft.Network/frontDoors/healthProbeSettings', variables('Front Door Name'), variables('Main Health Probe Settings'))]"
}
}
}
],
"routingRules": [
{
"name": "main-rule",
"properties": {
"frontendEndpoints": [
{
"id": "[resourceId('Microsoft.Network/frontDoors/frontendEndpoints', variables('Front Door Name'), variables('Main Front End'))]"
}
],
"acceptedProtocols": [
"Http",
"Https"
],
"patternsToMatch": [
"/*"
],
"routeConfiguration": {
"@odata.type": "#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration",
"forwardingProtocol": "HttpsOnly",
"backendPool": {
"id": "[resourceId('Microsoft.Network/frontDoors/backendPools', variables('Front Door Name'), variables('App Service Backend Pool'))]"
}
}
}
}
]
},
"resources": []
}
]
}
You can’t perform that action at this time.