I am trying to add app settings to my Azure Website via the JSON template files as part of the Azure Resource Manager.
In an Azure Resource template json file, there
Here is the solution for the latest release 2014-06-01 version of API.
"resources": [
{
"apiVersion": "2014-06-01",
"name": "[parameters('webSiteName')]",
"type": "Microsoft.Web/sites",
"location": "[parameters('webSiteLocation')]",
"tags": {
"[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('webSiteHostingPlanName'))]": "Resource",
"displayName": "WebSite"
},
"dependsOn": [
"[concat('Microsoft.Web/serverfarms/', parameters('webSiteHostingPlanName'))]"
],
"properties": {
"name": "[parameters('webSiteName')]",
"serverFarm": "[parameters('webSiteHostingPlanName')]"
},
"resources": [
{
"apiVersion": "2014-04-01",
"name": "MSDeploy",
"type": "extensions",
"dependsOn": [
"[concat('Microsoft.Web/Sites/', parameters('webSiteName'))]"
],
"properties": {
"packageUri": "[concat(parameters('dropLocation'), '/', parameters('webSitePackage'), parameters('dropLocationSasToken'))]",
"dbType": "None",
"connectionString": "",
"setParameters": {
"IIS Web Application Name": "[parameters('webSiteName')]"
}
}
},
{
"apiVersion": "2014-04-01",
"name": "web",
"type": "config",
"dependsOn": [
"[resourceId('Microsoft.Web/Sites', parameters('webSiteName'))]"
],
"properties": {
"connectionStrings": [
{
"ConnectionString": "AzureWebJobsStorage",
"Name": "CustomConnectionString1"
},
{
"ConnectionString": "AzureWebJobsStorage",
"Name": "CustomConnectionString2"
}
],
"appSettings": [
{
"Name": "Key1",
"Value": "Value1"
},
{
"Name": "Key2",
"Value": "Value2"
}
]
}
}
]
},