Skip to content

az network nsg rule create incorrect syntax #31033

@stevehardenCBR

Description

@stevehardenCBR

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

Metadata

Metadata

Assignees

Labels

Auto-AssignAuto assign by botNetworkaz network vnet/lb/nic/dns/etc...Possible-SolutionService AttentionThis issue is responsible by Azure service team.Similar-Issueact-quality-productivity-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions