Remove-AzFunctionAppSetting fails when trying to remove all app settings #17715
-
I'm not sure whether the behavior is expected or not. It took me some time to find out the reason why my script was failing Maybe, it would make sense to document it. When trying to remove all app settings, the script fails as below:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hello @xsurfer -- Thank you for reporting this issue. Please note that there is a list of reserved app settings which cannot be deleted because it will leave the function app in a broken state. This is the list of the app settings: https://github.com/Azure/azure-powershell/blob/generation/src/Functions/custom/HelperFunctions.ps1#L20. The error you have in the output comes from this line: https://github.com/Azure/azure-powershell/blob/generation/src/Functions/custom/Remove-AzFunctionAppSetting.ps1#L126. This means that the app did not have any app settings to begin with which is a bit confusing. Could you please share a repro? This will be helpful to try to understand the issue. Alternatively, please open an issue directly here https://github.com/Azure/azure-powershell/issues and tag me on it. Thank you. |
Beta Was this translation helpful? Give feedback.
Hello @xsurfer -- Thank you for reporting this issue.
Please note that there is a list of reserved app settings which cannot be deleted because it will leave the function app in a broken state. This is the list of the app settings: https://github.com/Azure/azure-powershell/blob/generation/src/Functions/custom/HelperFunctions.ps1#L20.
The error you have in the output comes from this line: https://github.com/Azure/azure-powershell/blob/generation/src/Functions/custom/Remove-AzFunctionAppSetting.ps1#L126. This means that the app did not have any app settings to begin with which is a bit confusing. Could you please share a repro? This will be helpful to try to understand the issue. Alternativ…