Created
April 24, 2018 16:05
-
-
Save shawnweisfeld/298ed80537b1302e1fd146c93f17f15c to your computer and use it in GitHub Desktop.
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": { | |
"AppServicePlanName": { | |
"type": "string", | |
"metadata": { | |
"description": "The name of your ASP." | |
} | |
}, | |
"WebSiteName": { | |
"type": "string", | |
"metadata": { | |
"description": "The WebSite Name Prefix" | |
} | |
} | |
}, | |
"variables": { | |
"WebSiteNameFull": "[concat(parameters('WebSiteName'), '-', uniqueString(resourceGroup().id))]", | |
"AppInsightsNameFull": "[concat(parameters('WebSiteName'), 'AI-', uniqueString(resourceGroup().id))]" | |
}, | |
"resources": [ | |
{ | |
"apiVersion": "2014-06-01", | |
"name": "[parameters('AppServicePlanName')]", | |
"type": "Microsoft.Web/serverfarms", | |
"location": "[resourceGroup().location]", | |
"sku": { | |
"name": "F1", | |
"tier": "Free", | |
"size": "F1", | |
"family": "F", | |
"capacity": 0 | |
}, | |
"tags": { | |
"displayName": "[parameters('AppServicePlanName')]" | |
}, | |
"properties": { | |
"name": "[parameters('AppServicePlanName')]" | |
} | |
}, | |
{ | |
"apiVersion": "2015-08-01", | |
"name": "[variables('WebSiteNameFull')]", | |
"type": "Microsoft.Web/sites", | |
"location": "[resourceGroup().location]", | |
"tags": { | |
"[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('AppServicePlanName'))]": "Resource", | |
"displayName": "[variables('WebSiteNameFull')]" | |
}, | |
"dependsOn": [ | |
"[resourceId('Microsoft.Web/serverfarms/', parameters('AppServicePlanName'))]" | |
], | |
"properties": { | |
"name": "[variables('WebSiteNameFull')]", | |
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms/', parameters('AppServicePlanName'))]" | |
}, | |
"resources": [ | |
{ | |
"apiVersion": "2015-08-01", | |
"name": "Microsoft.ApplicationInsights.AzureWebSites", | |
"type": "siteextensions", | |
"properties": { }, | |
"dependsOn": [ | |
"[resourceId('Microsoft.Web/sites', variables('WebSiteNameFull'))]" | |
] | |
}, | |
{ | |
"apiVersion": "2015-08-01", | |
"name": "appsettings", | |
"type": "config", | |
"dependsOn": [ | |
"[resourceId('Microsoft.Web/sites', variables('WebSiteNameFull'))]", | |
"[resourceId('Microsoft.Insights/components', variables('AppInsightsNameFull'))]" | |
], | |
"properties": { | |
"APPINSIGHTS_INSTRUMENTATIONKEY": "[reference(resourceId('Microsoft.Insights/components', variables('AppInsightsNameFull')), '2014-04-01').InstrumentationKey]" | |
} | |
} | |
] | |
}, | |
{ | |
"apiVersion": "2014-04-01", | |
"name": "[variables('AppInsightsNameFull')]", | |
"type": "Microsoft.Insights/components", | |
"location": "[resourceGroup().location]", | |
"dependsOn": [ | |
"[resourceId('Microsoft.Web/sites', variables('WebSiteNameFull'))]" | |
], | |
"tags": { | |
"[concat('hidden-link:', resourceId('Microsoft.Web/sites', variables('WebSiteNameFull')))]": "Resource", | |
"displayName": "[variables('AppInsightsNameFull')]" | |
}, | |
"properties": { | |
"ApplicationId": "[variables('AppInsightsNameFull')]" | |
} | |
} | |
], | |
"outputs": {} | |
} |
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":"http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", | |
"contentVersion":"1.0.0.0", | |
"parameters":{ | |
"AppServicePlanName":{ | |
"value":"MovieDB-ASP" | |
}, | |
"WebSiteName":{ | |
"value":"MovieDB" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment