Azure / Azure/azure-quickstart-templates

webapp appsettings gets overwritten

Open
#6,613 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Bicep
Stars
14.9k
Forks
16.2k
Avg merge
6d 21h
Merged PRs (30d)
6

Description

When we try to send app settings dynamically, following settings gets overwritten.

APPINSIGHTS_INSTRUMENTATIONKEY
WEBSITE_HTTPLOGGING_CONTAINER_URL
WEBSITE_HTTPLOGGING_RETENTION_DAYS

```

"resources": [
{
"apiVersion": "2018-02-01",
"type": "Microsoft.Web/sites",
"name": "[parameters('appName')]",
"location": "[resourceGroup().location]",
"tags": "[parameters('tags')]",
"dependsOn": [
"[resourceId('Microsoft.Insights/components', parameters('appInsightsName'))]"
],
"identity": {
"type": "[if(equals(parameters('managedServiceIdentity'), 'yes'), 'SystemAssigned', 'None')]"
},
"properties": {
"name": "[parameters('appName')]",
"siteConfig": {
"appSettings": [
{
"name": "APPINSIGHTS_INSTRUMENTATIONKEY",
"value": "[reference(resourceId('Microsoft.Insights/components', parameters('appInsightsName')), '2015-05-01').InstrumentationKey]"
}
],
"metadata": [
{
"name": "CURRENT_STACK",
"value": "[parameters('currentStack')]"
}
]
},
"serverFarmId": "[resourceId(parameters('servicePlanRG'), 'Microsoft.Web/serverfarms',parameters('servicePlanName'))]",
"hostingEnvironment": "[parameters('serviceEnvironmentName')]",
},
"resources": [
{
"apiVersion": "2018-02-01",
"name": "logs",
"type": "config",
"dependsOn": [
"[resourceId('Microsoft.Web/Sites', parameters('appName'))]"
],
"properties": "[variables('logProperties')]"
},
{
"apiVersion": "2015-08-01",
"name": "web",
"type": "config",
"tags": "[parameters('tags')]",
"dependsOn": [
"[resourceId('Microsoft.Web/Sites', parameters('appName'))]"
],
"properties": "[variables('siteProperties')]"
},
{
"apiVersion": "2014-11-01",
"name": "appSettings",
"type": "config",
"dependsOn": [
"[resourceId('Microsoft.Web/Sites', parameters('appName'))]"
],
"properties": "[parameters(appSettings')]"
}
{
"apiVersion": "2014-11-01",
"name": "connectionstrings",
"type": "config",
"dependsOn": [
"[resourceId('Microsoft.Web/Sites', parameters('appName'))]"
],
"properties": "[parameters('connectionStrings')]"
}
]
},
{
"type": "Microsoft.Web/sites/hostnameBindings",
"name": "[concat(parameters('appName'), '/', parameters('dnsName'))]",
"apiVersion": "2016-03-01",
"location": "[resourceGroup().location]",
"properties": {},
"dependsOn": [
"[resourceId('Microsoft.Web/Sites', parameters('appName'))]"
]
},
{
"apiVersion": "2016-08-01",
"type": "Microsoft.Web/sites/slots",
"name": "[variables('slotName')]",
"kind": "app",
"location": "[resourceGroup().location]",
"tags": "[parameters('tags')]",
"properties": {
"serverFarmId": "[resourceId(parameters('servicePlanRG'), 'Microsoft.Web/serverfarms',parameters('servicePlanName'))]"
},
"dependsOn": [
"[resourceId('Microsoft.Web/Sites', parameters('appName'))]"
],
},
{
"apiVersion": "2018-05-01-preview",
"name": "[parameters('appInsightsName')]",
"type": "Microsoft.Insights/components",
"location": "[resourceGroup().location]",
"tags": "[parameters('tags')]",
"properties": {
"ApplicationId": "[parameters('appName')]",
"Request_Source": "IbizaWebAppExtensionCreate"
}
}
]
}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the Microsoft.Web/sites resource and its nested config resources, especially the siteConfig.appSettings and appSettings properties shown in the template. Reproduce a deployment using the supplied settings and check which resource writes last. Done means the listed application settings remain intact after deployment.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
cloud, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.