WebApp:az webapp config appsettings - changing a slot setting to a non slot setting fails
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
**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
Contributor guide
Assessment
This issue has not been assessed yet.