Last active
April 6, 2018 16:30
-
-
Save ossentoo/9c51334ba1b7cade9060e27325182e84 to your computer and use it in GitHub Desktop.
ARM Template: Web App with traffic manager and custom hostname
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"webAppPrefix": { | |
"value": "siteapidev2-lbxvta4fkayk6-site-0" | |
}, | |
"storageAccountName": { | |
"value": "siteapidev0406141102" | |
}, | |
"serverFarmName": { | |
"value": "siteapidev2-asp-lbxvta4fkayk6" | |
}, | |
"trafficManagerPrefix": { | |
"value": "domain-dev-tm" | |
}, | |
"webConfigName": { | |
"value": "web" | |
}, | |
"customHostname": { | |
"value": "site-dev.domain.com" | |
}, | |
"trafficManagerHostName": { | |
"value": "domain-dev-tm.trafficmanager.net" | |
}, | |
"webAppHostName": { | |
"value": "siteapidev2-lbxvta4fkayk6-site-0.azurewebsites.net" | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"webAppPrefix": { | |
"type": "string" | |
}, | |
"storageAccountName": { | |
"type": "string" | |
}, | |
"serverFarmName": { | |
"type": "string" | |
}, | |
"trafficManagerPrefix": { | |
"type": "string" | |
}, | |
"webConfigName": { | |
"type": "string" | |
}, | |
"customHostname": { | |
"type": "string" | |
}, | |
"trafficManagerHostName": { | |
"type": "string" | |
}, | |
"webAppHostName": { | |
"type": "string" | |
} | |
}, | |
"variables": {}, | |
"resources": [ | |
{ | |
"comments": "Generalized from resource: '/subscriptions/45c75e73-bdae-4c97-90eb-d754835e2d1e/resourceGroups/testfunctionrg/providers/Microsoft.Network/trafficManagerProfiles/domain-dev-tm'.", | |
"type": "Microsoft.Network/trafficManagerProfiles", | |
"name": "[parameters('trafficManagerPrefix')]", | |
"apiVersion": "2017-05-01", | |
"location": "global", | |
"tags": {}, | |
"scale": null, | |
"properties": { | |
"profileStatus": "Enabled", | |
"trafficRoutingMethod": "Performance", | |
"dnsConfig": { | |
"relativeName": "[parameters('trafficManagerPrefix')]", | |
"fqdn": "[concat(parameters('trafficManagerPrefix'),'.trafficmanager.net')]", | |
"ttl": 30 | |
}, | |
"monitorConfig": { | |
"protocol": "HTTPS", | |
"port": 443, | |
"path": "/", | |
"intervalInSeconds": 30, | |
"toleratedNumberOfFailures": 3, | |
"timeoutInSeconds": 10 | |
}, | |
"endpoints": [ | |
{ | |
"name": "siteapidev2-endpoint-0", | |
"type": "Microsoft.Network/trafficManagerProfiles/azureEndpoints", | |
"properties": { | |
"endpointStatus": "Enabled", | |
"targetResourceId": "[resourceId('Microsoft.Web/sites', parameters('webAppPrefix'))]", | |
"target": "siteapidev2-lbxvta4fkayk6-site-0.azurewebsites.net", | |
"weight": 1, | |
"priority": 1, | |
"endpointLocation": "UK South" | |
} | |
} | |
] | |
}, | |
"dependsOn": [ | |
"[resourceId('Microsoft.Web/sites', parameters('webAppPrefix'))]" | |
] | |
}, | |
{ | |
"comments": "Generalized from resource: '/subscriptions/45c75e73-bdae-4c97-90eb-d754835e2d1e/resourceGroups/TestFunctionRG/providers/Microsoft.Storage/storageAccounts/siteapidev0406141102'.", | |
"type": "Microsoft.Storage/storageAccounts", | |
"sku": { | |
"name": "Standard_LRS", | |
"tier": "Standard" | |
}, | |
"kind": "Storage", | |
"name": "[parameters('storageAccountName')]", | |
"apiVersion": "2017-10-01", | |
"location": "uksouth", | |
"tags": {}, | |
"scale": null, | |
"properties": { | |
"networkAcls": { | |
"bypass": "AzureServices", | |
"virtualNetworkRules": [], | |
"ipRules": [], | |
"defaultAction": "Allow" | |
}, | |
"supportsHttpsTrafficOnly": false, | |
"encryption": { | |
"services": { | |
"file": { | |
"enabled": true | |
}, | |
"blob": { | |
"enabled": true | |
} | |
}, | |
"keySource": "Microsoft.Storage" | |
} | |
}, | |
"dependsOn": [] | |
}, | |
{ | |
"comments": "Generalized from resource: '/subscriptions/45c75e73-bdae-4c97-90eb-d754835e2d1e/resourceGroups/TestFunctionRG/providers/Microsoft.Web/serverfarms/siteapidev2-asp-lbxvta4fkayk6'.", | |
"type": "Microsoft.Web/serverfarms", | |
"sku": { | |
"name": "S1", | |
"tier": "Standard", | |
"size": "S1", | |
"family": "S", | |
"capacity": 1 | |
}, | |
"kind": "app", | |
"name": "[parameters('serverFarmName')]", | |
"apiVersion": "2016-09-01", | |
"location": "UK South", | |
"scale": null, | |
"properties": { | |
"name": "[parameters('serverFarmName')]", | |
"workerTierName": null, | |
"adminSiteName": null, | |
"hostingEnvironmentProfile": null, | |
"perSiteScaling": false, | |
"reserved": false, | |
"targetWorkerCount": 0, | |
"targetWorkerSizeId": 0 | |
}, | |
"dependsOn": [] | |
}, | |
{ | |
"comments": "Generalized from resource: '/subscriptions/45c75e73-bdae-4c97-90eb-d754835e2d1e/resourceGroups/TestFunctionRG/providers/Microsoft.Web/sites/siteapidev2-lbxvta4fkayk6-site-0'.", | |
"type": "Microsoft.Web/sites", | |
"kind": "functionapp", | |
"name": "[parameters('webAppPrefix')]", | |
"apiVersion": "2016-08-01", | |
"location": "UK South", | |
"tags": { | |
"hidden-related:/subscriptions/a71b47cc-e3e7-483e-b229-d28bf062e6a1/resourceGroups/UKSouthBlog/providers/Microsoft.Web/serverfarms/B1BasicPlanForUK": "empty" | |
}, | |
"scale": null, | |
"properties": { | |
"enabled": true, | |
"hostNameSslStates": [ | |
{ | |
"name": "[concat(parameters('webAppPrefix'),'.azurewebsites.net')]", | |
"sslState": "Disabled", | |
"virtualIP": null, | |
"thumbprint": null, | |
"toUpdate": null, | |
"hostType": "Standard" | |
}, | |
{ | |
"name": "[concat(parameters('webAppPrefix'),'.scm.azurewebsites.net')]", | |
"sslState": "Disabled", | |
"virtualIP": null, | |
"thumbprint": null, | |
"toUpdate": null, | |
"hostType": "Repository" | |
}, | |
{ | |
"name": "domain-dev-tm.trafficmanager.net", | |
"sslState": "Disabled", | |
"virtualIP": null, | |
"thumbprint": null, | |
"toUpdate": null, | |
"hostType": "Standard" | |
}, | |
{ | |
"name": "site-dev.domain.com", | |
"sslState": "Disabled", | |
"virtualIP": null, | |
"thumbprint": null, | |
"toUpdate": null, | |
"hostType": "Standard" | |
} | |
], | |
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', parameters('serverFarmName'))]", | |
"reserved": false, | |
"siteConfig": null, | |
"scmSiteAlsoStopped": false, | |
"hostingEnvironmentProfile": null, | |
"clientAffinityEnabled": true, | |
"clientCertEnabled": false, | |
"hostNamesDisabled": false, | |
"containerSize": 1536, | |
"dailyMemoryTimeQuota": 0, | |
"cloningInfo": null | |
}, | |
"dependsOn": [ | |
"[resourceId('Microsoft.Web/serverfarms', parameters('serverFarmName'))]" | |
] | |
}, | |
{ | |
"comments": "Generalized from resource: '/subscriptions/45c75e73-bdae-4c97-90eb-d754835e2d1e/resourceGroups/TestFunctionRG/providers/Microsoft.Web/sites/siteapidev2-lbxvta4fkayk6-site-0/config/web'.", | |
"type": "Microsoft.Web/sites/config", | |
"name": "[concat(parameters('webAppPrefix'), '/', parameters('webConfigName'))]", | |
"apiVersion": "2016-08-01", | |
"location": "UK South", | |
"tags": { | |
"hidden-related:/subscriptions/a71b47cc-e3e7-483e-b229-d28bf062e6a1/resourceGroups/UKSouthBlog/providers/Microsoft.Web/serverfarms/B1BasicPlanForUK": "empty" | |
}, | |
"scale": null, | |
"properties": { | |
"numberOfWorkers": 1, | |
"defaultDocuments": [ | |
"Default.htm", | |
"Default.html", | |
"Default.asp", | |
"index.htm", | |
"index.html", | |
"iisstart.htm", | |
"default.aspx", | |
"index.php" | |
], | |
"netFrameworkVersion": "v4.0", | |
"phpVersion": "5.6", | |
"pythonVersion": "", | |
"nodeVersion": "", | |
"linuxFxVersion": "", | |
"requestTracingEnabled": false, | |
"remoteDebuggingEnabled": false, | |
"remoteDebuggingVersion": null, | |
"httpLoggingEnabled": false, | |
"logsDirectorySizeLimit": 35, | |
"detailedErrorLoggingEnabled": false, | |
"publishingUsername": "$siteapidev2-lbxvta4fkayk6-site-0", | |
"publishingPassword": null, | |
"appSettings": null, | |
"metadata": null, | |
"connectionStrings": null, | |
"machineKey": null, | |
"handlerMappings": null, | |
"documentRoot": null, | |
"scmType": "None", | |
"use32BitWorkerProcess": true, | |
"webSocketsEnabled": false, | |
"alwaysOn": false, | |
"javaVersion": null, | |
"javaContainer": null, | |
"javaContainerVersion": null, | |
"appCommandLine": "", | |
"managedPipelineMode": "Integrated", | |
"virtualApplications": [ | |
{ | |
"virtualPath": "/", | |
"physicalPath": "site\\wwwroot", | |
"preloadEnabled": false, | |
"virtualDirectories": null | |
} | |
], | |
"winAuthAdminState": 0, | |
"winAuthTenantState": 0, | |
"customAppPoolIdentityAdminState": false, | |
"customAppPoolIdentityTenantState": false, | |
"runtimeADUser": null, | |
"runtimeADUserPassword": null, | |
"loadBalancing": "LeastRequests", | |
"routingRules": [], | |
"experiments": { | |
"rampUpRules": [] | |
}, | |
"limits": null, | |
"autoHealEnabled": false, | |
"autoHealRules": null, | |
"tracingOptions": null, | |
"vnetName": "", | |
"siteAuthEnabled": false, | |
"siteAuthSettings": { | |
"enabled": null, | |
"unauthenticatedClientAction": null, | |
"tokenStoreEnabled": null, | |
"allowedExternalRedirectUrls": null, | |
"defaultProvider": null, | |
"clientId": null, | |
"clientSecret": null, | |
"issuer": null, | |
"allowedAudiences": null, | |
"additionalLoginParams": null, | |
"isAadAutoProvisioned": false, | |
"googleClientId": null, | |
"googleClientSecret": null, | |
"googleOAuthScopes": null, | |
"facebookAppId": null, | |
"facebookAppSecret": null, | |
"facebookOAuthScopes": null, | |
"twitterConsumerKey": null, | |
"twitterConsumerSecret": null, | |
"microsoftAccountClientId": null, | |
"microsoftAccountClientSecret": null, | |
"microsoftAccountOAuthScopes": null | |
}, | |
"cors": { | |
"allowedOrigins": [ | |
"https://functions.azure.com", | |
"https://functions-staging.azure.com", | |
"https://functions-next.azure.com" | |
] | |
}, | |
"push": null, | |
"apiDefinition": null, | |
"autoSwapSlotName": null, | |
"localMySqlEnabled": false, | |
"managedServiceIdentityId": null, | |
"ipSecurityRestrictions": null, | |
"http20Enabled": true, | |
"minTlsVersion": "1.0" | |
}, | |
"dependsOn": [ | |
"[resourceId('Microsoft.Web/sites', parameters('webAppPrefix'))]" | |
] | |
}, | |
{ | |
"comments": "Generalized from resource: '/subscriptions/45c75e73-bdae-4c97-90eb-d754835e2d1e/resourceGroups/TestFunctionRG/providers/Microsoft.Web/sites/siteapidev2-lbxvta4fkayk6-site-0/hostNameBindings/siteapidev2-lbxvta4fkayk6-site-0.azurewebsites.net'.", | |
"type": "Microsoft.Web/sites/hostNameBindings", | |
"name": "[concat(parameters('webAppPrefix'), '/', parameters('webAppHostName'))]", | |
"apiVersion": "2016-08-01", | |
"location": "UK South", | |
"scale": null, | |
"properties": { | |
"siteName": "siteapidev2-lbxvta4fkayk6-site-0", | |
"domainId": null, | |
"hostNameType": "Verified" | |
}, | |
"dependsOn": [ | |
"[resourceId('Microsoft.Web/sites', parameters('webAppPrefix'))]" | |
] | |
}, | |
{ | |
"comments": "Generalized from resource: '/subscriptions/45c75e73-bdae-4c97-90eb-d754835e2d1e/resourceGroups/TestFunctionRG/providers/Microsoft.Web/sites/siteapidev2-lbxvta4fkayk6-site-0/hostNameBindings/domain-dev-tm.trafficmanager.net'.", | |
"type": "Microsoft.Web/sites/hostNameBindings", | |
"name": "[concat(parameters('webAppPrefix'), '/', parameters('trafficManagerHostName'))]", | |
"apiVersion": "2016-08-01", | |
"location": "UK South", | |
"scale": null, | |
"properties": { | |
"siteName": "siteapidev2-lbxvta4fkayk6-site-0", | |
"domainId": null, | |
"hostNameType": "Verified" | |
}, | |
"dependsOn": [ | |
"[resourceId('Microsoft.Web/sites', parameters('webAppPrefix'))]", | |
"[resourceId('Microsoft.Network/trafficManagerProfiles', parameters('trafficManagerPrefix'))]", | |
] | |
}, | |
{ | |
"comments": "Generalized from resource: '/subscriptions/45c75e73-bdae-4c97-90eb-d754835e2d1e/resourceGroups/TestFunctionRG/providers/Microsoft.Web/sites/siteapidev2-lbxvta4fkayk6-site-0/hostNameBindings/site-dev.domain.com'.", | |
"type": "Microsoft.Web/sites/hostNameBindings", | |
"name": "[concat(parameters('webAppPrefix'), '/', parameters('customHostname'))]", | |
"apiVersion": "2016-08-01", | |
"location": "UK South", | |
"scale": null, | |
"properties": { | |
"siteName": "siteapidev2-lbxvta4fkayk6-site-0", | |
"domainId": null, | |
"hostNameType": "Verified" | |
}, | |
"dependsOn": [ | |
"[resourceId('Microsoft.Web/sites', parameters('webAppPrefix'))]" | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment