az network nsg rule create incorrect syntax #31033
Labels
Auto-Assign
Auto assign by bot
Azure CLI Team
The command of the issue is owned by Azure CLI team
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
Network
az network vnet/lb/nic/dns/etc...
Possible-Solution
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Similar-Issue
Milestone
Describe the bug
When using az network nsg rule create command and using either of the following parameters the syntax for entering the data is incorrect (this should be updated in the ?? command:
--destination-address-prefixes
--destination-port-ranges
--source-address-prefixes
--source-port-ranges
when using these with multiple CIDR or ip addresses is says to pass them as "space separated strings" but when you pass --destination-address-prefixes 10.1.1.0/24 10.2.1.0/24 for example, you will receive an "incorrect parameter" message.
what you need to pass to these parameters is a splatted string such as
--destination-address-prefixes @("10.1.1.0/24","10.2.1.0/24")
Related command
az network nsg rule create
Errors
incorrect parameters passed
Issue script & Debug output
it simply errors with incorrect parameters
Expected behavior
it should be able to complete correctly
Environment Summary
azure cli latest
Additional context
No response
The text was updated successfully, but these errors were encountered: