{
"$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"AppInsights_name": {
"type": "string"
},
"type": {
"type": "string"
},
"regionId": {
"type": "string"
},
"WebAppName": {
"type": "string",
"metadata": {
"description": "Name of the webapp"
}
},
"hostingPlanName": {
"type": "string",
"metadata": {
"description": "Name of the service plan name"
}
},
"location": {
"type": "string"
},
"RGName": {
"type": "string"
},
"subscriptionId": {
"type": "string"
}
},
"variables": {
"WebAppName": "[concat(parameters('WebAppName'))]",
"SlotName": "staging",
"clientAffinityEnabled": false
},
"resources": [
{
"name": "[parameters('AppInsights_name')]",
"type": "microsoft.insights/components",
"location": "[parameters('regionId')]",
"apiVersion": "2014-08-01",
"properties": {
"ApplicationId": "[parameters('AppInsights_name')]",
}
},
{
"name": "[parameters('WebAppName')]",
"type": "Microsoft.Web/sites",
"apiVersion": "2018-02-01",
"properties": {
"name": "[parameters('WebAppName')]",
"serverFarmId": "[concat('/subscriptions/', parameters('subscriptionId'),'/resourcegroups/', parameters('RGName'), '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]"
},
"apiVersion": "2018-02-01",
"location": "[parameters('location')]"
],
"outputs": {
"APPINSIGHTS_INSTRUMENTATIONKEY": {
"value": "[reference(resourceId('microsoft.insights/components/', parameters('AppInsights_name')), '2015-05-01').InstrumentationKey]",
"type": "string"
},
"WebAppURL": {
"type": "string",
"value": "[concat('https://', reference(resourceId('Microsoft.Web/Sites', parameters('webAppName')),'2018-11-01').defaultHostName)]"
}
}
}
Published by SRM
8 Years of experience in IT industry as .Net Developer and Azure developer. I am sharing this space with Vivekananda Rapaka who has 10 years of experience in IT and have expertise on azure , aws , kubernetes , dev ops.
View all posts by SRM
1 thought on “Example of Nested ARM template”