'az network front-door rules-engine rule condition add' command fails for GeoMatch with Country List
See original GitHub issue
az feedback
auto-generates most of the information requested below, as of CLI version 2.0.62
Related command
az network front-door rules-engine rule condition add -f $Name
-g $ResourceGroup --rules-engine-name $RulesEngineName
–name $RuleName --match-variable RemoteAddr
–operator GeoMatch --match-values ["AT", "BE", "BG", "HR", "CY", "CZ", "DK", "EE", "FI", "FR"]
–negate-condition false
Describe the bug ERROR: (BadRequest) Rules Engines validation failed. More information: AT BE BG HR CY CZ DK EE FI FR are not supported country codes… Code: BadRequest Message: Rules Engines validation failed. More information: AT BE BG HR CY CZ DK EE FI FR are not supported country codes…
To Reproduce
Execute rule condition add command with multiple country codes as match-values.
az network front-door rules-engine rule condition add -f $Name
-g $ResourceGroup --rules-engine-name $RulesEngineName
–name $RuleName --match-variable RemoteAddr
–operator GeoMatch --match-values ["AT", "BE", "BG", "HR", "CY", "CZ", "DK", "EE", "FI", "FR"]
–negate-condition false
Expected behavior Front door rule with geo match condition with multiple countries should be created.
Environment summary azure-cli 2.40.0
core 2.40.0 telemetry 1.0.8
Extensions: azure-devops 0.25.0
Dependencies: msal 1.18.0b1 azure-mgmt-resource 21.1.0b1
Issue Analytics
- State:
- Created a year ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
@adsathye , that might be related to https://github.com/Azure/azure-cli/issues/23797#issuecomment-1238997338, Azure CLI has made some changes in 2.40.0 regarding to passing PowerShell arrays as multiple values argument to CLI.
Hi @adsathye , it seems that you are not using the correct way to pass in multiple-value arguments. You are suggested to use space-separated list of values for --match-values:
Instead of using:
Could you try:
Or using the splatting to pass list as multiple arguments like below