Skip to content

WebApp:az webapp config appsettings - changing a slot setting to a non slot setting fails #20625

@marmul1

Description

@marmul1

Describe the bug
If you create an app setting using the --slot-setting flag then delete the app setting and recreate it with the --setting flag Azure Portal still shows it with "Deployment slot setting" ticked.

To Reproduce

  1. Create a brand new app setting by running
    az webapp config appsettings set --name "my-web-app" --resource-group "my-web-app-resource-group" --slot-settings MyAppSettingName="my-app-setting-value" -s stage
  2. Refresh the Configuration in Azure Portal for the affected web app and confirm the new setting is there with 'Deployment slot setting' ticked
  3. Deleted the newly created app setting via Azure Portal and click save
  4. Refresh the Configuration in Azure Portal and confirm the new setting has disappeared
  5. Recreate the same app setting with the same name but not as a slot-setting by running
    az webapp config appsettings set --name "my-web-app" --resource-group "my-web-app-resource-group" --settings MyAppSettingName="my-app-setting-value" -s stage
  6. Refresh the Configuration in Azure Portal and you can see the app setting comes back but the 'Deployment slot setting' is still ticked, but it shouldn't be. However the response from the command line did show the app setting being created as a non slotSetting
[
  {
    "name": "WEBSITE_NODE_DEFAULT_VERSION",
    "slotSetting": false,
    "value": "6.9.1"
  },
  {
    "name": "MyAppSettingName",
    **"slotSetting": false**,
    "value": "my-app-setting-value"
  }
]

To confim this is just caused on the second run I...
7. Created another brand new app setting with a different name that is not a slot setting by running
az webapp config appsettings set --name "my-web-app" --resource-group "my-web-app-resource-group" --settings MyNEWAppSettingName="my-app-setting-value" -s stage
8. Refreshed the Configuration in Azure Portal. Now I have two app settings:
MyAppSettingName: 'Deployment slot setting' ticked - not expected
MyNEWAppSettingName: 'Deployment slot setting' unticked - as expected

Expected behavior
When running step 5 above the 'Deployment slot setting' should be unticked in Azure Portal

Environment summary
CLI version 2.30.0
Powershell Version 7.0.4
Powershell Edition Core
OS Microsoft Windows 10.0.19043

Additional context
Running commands from Microsoft Code Terminal

Metadata

Metadata

Assignees

Labels

Service AttentionThis issue is responsible by Azure service team.Web Appsaz webappact-observability-squadapp-service-clicustomer-reportedIssues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions