Skip to content
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-network-application-gateway-waf-policy-custom-rule-create : matchConditions should not be optional and must be not empty #30043

Open
yanivsag opened this issue Oct 8, 2024 · 1 comment
Assignees
Labels
Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team Network az network vnet/lb/nic/dns/etc... question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone

Comments

@yanivsag
Copy link
Member

yanivsag commented Oct 8, 2024

Describe the bug

according to https://learn.microsoft.com/en-us/cli/azure/network/application-gateway/waf-policy/custom-rule?view=azure-cli-latest&tryIt=true&source=docs#az-network-application-gateway-waf-policy-custom-rule-create

the matchConditions parameter is optional and can contain an empty list while it is not.

Related command

az network application-gateway waf-policy custom-rule create

Errors

not providing match conditions will result in validation error

Issue script & Debug output

az network application-gateway waf-policy custom-rule create --action Allow --name test --policy-name test --priority 100 --resource-group AZFW-SME-RG --rule-type MatchRule

(ApplicationGatewayFirewallCustomRuleInvalidPriority) Custom Rule 'test' does not have a match condition defined in context 'properties.customRules[0]'.
Code: ApplicationGatewayFirewallCustomRuleNoMatchConditionNotSupported
Message: Custom Rule 'test' does not have a match condition defined in context 'properties.customRules[0]'.

Expected behavior

the command itself is OK, the problem is with the help hint and documentation

Environment Summary

$ az version
{
"azure-cli": "2.65.0",
"azure-cli-core": "2.65.0",
"azure-cli-telemetry": "1.1.0",
"extensions": {
"ai-examples": "0.2.5",
"ml": "2.30.1",
"ssh": "2.0.5"
}
}

Additional context

No response

@yanivsag yanivsag added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Oct 8, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Network az network vnet/lb/nic/dns/etc... label Oct 8, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Oct 8, 2024
@yonzhan
Copy link
Collaborator

yonzhan commented Oct 8, 2024

Thank you for opening this issue, we will look into it.

@yonzhan yonzhan added this to the Backlog milestone Oct 8, 2024
@yonzhan yonzhan removed the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team Network az network vnet/lb/nic/dns/etc... question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

3 participants