azure-cli: Application Gateway - Error creating rule: Either all or no rule should have the priority specified

Related command az network application-gateway rule create

Describe the bug Attempting to create a new rule produces the following error:

ERROR: (ApplicationGatewayRequestRoutingRulePartialPriorityDefined) Either all or no rule should have the priority specified.

The CLI command does not provide the --priority flag so the priority number should be automatically generated (all other rules in the AGW have a priority already set).

To Reproduce Execute the following command:

az network application-gateway rule create `
        --gateway-name test-gateway-name `
        --name test-rule-name `
        --resource-group test-rg-name `
        --http-listener test-listener-name `
        --http-settings test-httpsetting-name `
        --address-pool test-address-pool-name

Expected behavior The priority value should be automatically generated by the service when it is not provided in the command.

Environment summary The CLI command is being executed by a ubuntu-18.04 Azure DevOps work agent.

Additional context This has only recently started failing (last couple of days).

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 18 (7 by maintainers)

Most upvoted comments

Are you saying that it is intended to not have the same behaviour between az cli version 2.34 and 2.37 because of the service? I understand the change in the service part, what I am still confuse is why we have different response depending on our az cli version.

More specifically, the reason is 2.34 and 2.37 send requests based on different API versions:

And, as I mentioned before, the breaking change is involved since ‘2021-08-01’.

I confirm we are observing the same behavior. but it works for CUS region and doesn’t work for EUS2

It might be related to the deployment strategy, as you known, East US 2 is one of the canary regions. Let’s wait for the service team to jump in and provide us more information. : )

Same behavior here. We are using API Fluent to create/modify settings on AppGW. On api version 1.38.1 (latest) we haven’t seen any option to set priority on Rules.