I have an Azure App Service. I want to install the site extension ASP.NET Core Logging Integration programmatically.
So far what I have done is this:
- Install the site extension manually via the Azure browser GUI (Development Tools -> Extensions).
- Extract an ARM template (Automation -> Export template).
- Trim down the ARM template so it only contains the site and the site extension.
- Remove the site extension via the Azure browser GUI.
- Install the ARM template (to the same app service) using the CLI (
az deployment group create -f template.json...
). - In the Azure browser GUI, verify that the site extension is now installed.
The above works. The ARM template correctly installs the site extension. But I don't understand how. The whole template looks like this:
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"siteName": {
"type": "string"
},
"location": {
"type": "string"
}
},
"variables": {},
"resources": [
{
"type": "Microsoft.Web/sites",
"apiVersion": "2021-01-15",
"name": "[parameters('siteName')]",
"location": "[parameters('location')]",
"kind": "app",
"properties": {}
},
{
"type": "Microsoft.Web/sites/siteextensions",
"apiVersion": "2021-01-15",
"name": "[concat(parameters('siteName'), '/Microsoft.AspNetCore.AzureAppServices.SiteExtension')]",
"location": "West Europe",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('siteName'))]"
]
}
]
}
As far as I can see, nowhere is it specified which site extension to install. So I do not understand why my ARM template does what it does.
Can anyone please explain to me how I might modify this template to install a different site extension?