Skip to content

az network firewall policy rule-collection-group collection add-filter-collection returns a 'Bad Request' #24493

@plynch66

Description

@plynch66

Hi,

I can create an empty Network Rule Collection within a Rule Collection Group using the Azure Portal but if I try the same action using the Azure CLI the command fails .

The detailed error message is :

"statusMessage": "{"Message":"The request is invalid.","ModelState":{"resource":["{\"Status\":\"Failed\",\"Error\":{\"Code\":\"FirewallPolicyRuleIpAddressesAndPortsMustBeSpecified\",\"Message\":\"Firewall Policy Rule should have IP addresses and ports specified. * is used to match all.\",\"Target\":null}}"]}}"

The documentation states that the only required parameters are :
--collection-priority
--name
--policy-name
--rule-collection-group-name
--resource-group

However, the Azure Portal requires you to specify an action (either Allow or Deny) when completing this task. The Portal also allows you to create an empty rule collection without adding any rules at creation time but I am unable to do this using the AZ CLI.


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions