I have fully working ARM Template for our Staging and Prod environments on Azure. It is released via Azure DevOps.
However, i noticed that the Web App settings i have applied in my ARM for the Web App, it replicates over to the Web App Slots also. I know this can be manually ticked off on Azure, but is there a way to do it on the ARM template? I have looked at Microsoft Website but not seeing any help, and wondering if it is a manual task?
{
"type": "Microsoft.Web/sites/config",
"apiVersion": "2019-08-01",
"location": "[resourceGroup().location]",
"name": "[concat(parameters('webAppName'), '/appsettings')]",
"dependsOn": [
"[parameters('webAppName')]",
"[concat(parameters('sqlDatabase'), 'constr')]"
],
"properties": {
"APPINSIGHTS_INSTRUMENTATIONKEY": "[reference(resourceId('Microsoft.Insights/components', parameters('appInsights')), '2014-04-01').InstrumentationKey]",
"ApplicationInsightsAgent_EXTENSION_VERSION": "~2",
"DiagnosticServices_EXTENSION_VERSION": "~3",
}
This is what my App Settings code looks like (there are more app settings no point me copying it all)
Below is my Web App Slots ARM code
{
"apiVersion": "2019-08-01",
"type": "Microsoft.Web/sites/slots",
"name": "[concat(parameters('webAppName'), '/', parameters('slots')[copyIndex()])]",
"kind": "app",
"location": "[resourceGroup().location]",
"copy": {
"name": "WebAppSlots",
"count": "[length(parameters('slots'))]"
},
"properties": {
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', parameters('planName'))]"
},
"dependsOn": [
"[parameters('webAppName')]",
"[concat(parameters('sqlDatabase'), 'constr')]"
]
},
I would really appreciate any insight on this matter possible.
Thank you :)