Skip to content

Instantly share code, notes, and snippets.

@sanudatta11
Created January 24, 2019 07:49
Show Gist options
  • Save sanudatta11/2cea46cafaa8b2c1bdf374d452ba7533 to your computer and use it in GitHub Desktop.
Save sanudatta11/2cea46cafaa8b2c1bdf374d452ba7533 to your computer and use it in GitHub Desktop.
windows-webapp-template.json
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"webAppName": {
"type": "string"
},
"hostingPlanName": {
"type": "string"
},
"appInsightsLocation": {
"type": "string"
},
"sku": {
"type": "string",
"defaultValue": "Standard S1"
}
},
"resources": [
{
"type": "Microsoft.Web/sites",
"name": "[parameters('webAppName')]",
"apiVersion": "2016-08-01",
"location": "[resourceGroup().location]",
"tags": {
"[concat('hidden-related:', '/subscriptions/', subscription().subscriptionId,'/resourcegroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]": "empty"
},
"resources": [
{
"type": "siteextensions",
"name": "Microsoft.ApplicationInsights.AzureWebSites",
"apiVersion": "2015-08-01",
"dependsOn": [
"[resourceId('Microsoft.Web/Sites', parameters('webAppName'))]"
],
"properties": {
}
}
],
"properties": {
"siteConfig": {
"appSettings": [
{
"name": "APPINSIGHTS_INSTRUMENTATIONKEY",
"value": "[reference(resourceId('microsoft.insights/components/', parameters('webAppName')), '2015-05-01').InstrumentationKey]"
},
{
"name": "WEBSITE_NODE_DEFAULT_VERSION",
"value": "6.9.1"
}
],
"phpVersion": "7.1"
},
"name": "[parameters('webAppName')]",
"serverFarmId": "[concat('/subscriptions/', subscription().subscriptionId,'/resourcegroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]",
"hostingEnvironment": ""
},
"dependsOn": [
"[concat('Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]",
"[resourceId('microsoft.insights/components/', parameters('webAppName'))]"
]
},
{
"type": "Microsoft.Web/serverfarms",
"sku": {
"Tier": "[first(skip(split(parameters('sku'), ' '), 1))]",
"Name": "[first(split(parameters('sku'), ' '))]"
},
"name": "[parameters('hostingPlanName')]",
"apiVersion": "2015-08-01",
"location": "[resourceGroup().location]",
"properties": {
"name": "[parameters('hostingPlanName')]",
"workerSizeId": "0",
"reserved": false,
"numberOfWorkers": "1",
"hostingEnvironment": ""
}
},
{
"type": "Microsoft.Insights/components",
"name": "[parameters('webAppName')]",
"apiVersion": "2014-04-01",
"location": "[parameters('appInsightsLocation')]",
"tags": {
"[concat('hidden-link:', resourceGroup().id, '/providers/Microsoft.Web/sites/', parameters('webAppName'))]": "Resource"
},
"properties": {
"applicationId": "[parameters('webAppName')]",
"Request_Source": "AzureTfsExtensionAzureProject"
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment