How can I use ARM to deploy applicationsettings to a website?
1 When running the following in VS ARM Deploy json:
....
\"resources\": [
Answer 1
$webapp = Get-AzureRmWebApp -Name $webSiteName
$webapp.SiteConfig.AppSettings
Answer 2
Here what I have in my ARM template, and it works fine:
"resources": [
{
"apiVersion": "2015-08-01",
"location": "[resourceGroup().location]",
"type": "config",
"name": "appsettings",
"dependsOn": [
"[resourceId('Microsoft.Web/Sites', variables('webSiteName'))]"
],
"properties": {...}
},
{
"apiVersion": "2015-08-01",
"location": "[resourceGroup().location]",
"type": "config",
"name": "web",
"dependsOn": [
"[resourceId('Microsoft.Web/Sites', variables('webSiteName'))]"
],
"properties": {
"alwaysOn": true
}]
As you can see I set AppSettings as separate resource under website. Try it, should work.
Hope it helps.