-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
az functionapp config appsettings set for multiple config not working from 2.40 #23887
Comments
route to CXP team |
@kornbo2-dev Thank you for reaching out, we are looking into it. |
Thank you. This is causing all our deployments to fail as devOps is running the scripts using 2.40. Let us know if there is a workaround. thank you. |
we are actually using this one.... via a variable and it was working.... $FunctionAppConfigCreate = @("AppConfig1=test" "AppConfig2=test2") az functionapp config appsettings set --name $FunctionAppName --resource-group $ResourceGroupName --slot-settings $FunctionAppConfigCreate |
@kornbo2-dev We are unable to reproduce this issue at our end with 2.40.0, please see below screenshots |
We are actually putting it on a variable, apologies... can you try below? thanks $FunctionAppConfigCreate = @("AppConfig1=test", "AppConfig2=test2") az functionapp config appsettings set --name $FunctionAppName --resource-group $ResourceGroupName --slot-settings $FunctionAppConfigCreate |
similar issue happens for |
@StrawnSC / @panchagnula is this a regression? |
This is not a regression. This is failing due to the $FunctionAppConfigCreate powershell var. When a powershell string array is passed, it is automatically converted to a string with quotation delimiters, so you end up passing |
this used to work before in all our pipelines using 2.39 anyway, we have found a workaround not to use an array variable as we have over 50+ config that we need to pass... |
There is no changes on specifically to this command that can explain any regressions. Glad you found a work around. |
Duplicate of #23797 |
@panchagnula I don't think this issue should be closed. There is something weird here. All of our MS Hosted pipelines that use the Azure CLI task with PowerShell Core started to break after they upgraded their image to use Azure CLI version 2.40. I have narrowed the issue down to using to the The following works:
The following throws an error (due to the space in the value of Key2):
As others have mentioned, I have been using this command (within Azure pipelines as well as from my local computer's PowerShell) successfully previously. It's only when I upgraded my local Azure CLI to version 2.40 that I started to get this error. |
@sreagleeye use the parent bug for updates/ discussions. As mentioned there were no changes specific to this command. |
@sreagleeye Please see the explanation and solution at #23797 (comment) |
@RakeshMohanMSFT Thank you for that update. I had not seen that comment/solution. This is an issue across all commands that use array parameters. Using splatting as that comment specifies has fixed the issue. |
az functionapp config appsettings set command for multiple config not working from 2.40
https://docs.microsoft.com/en-us/cli/azure/functionapp/config/appsettings?view=azure-cli-latest
This use to work before 2.40:
az functionapp config appsettings set --name $FunctionAppName --resource-group $ResourceGroupName --slot-settings "AppConfig1=test" "AppConfig2=test2"
now still works, but all the values will be stored in AppConfig1
AppConfig1=test AppConfig2=test2
The text was updated successfully, but these errors were encountered: