Hello, Welcome to MS Q&A
Azure Front Door does not allow duplicate order values for delivery rules because each rule must have a unique priority value to ensure that the rules are processed in the correct sequence. This uniqueness prevents conflicts in rule evaluation and ensures that the system can determine which rule to apply first when multiple rules are triggered.
References:
- What is a rule set in Azure Front Door? (front-door-standard-premium)
- What is a rule set in Azure Front Door? (front-door-classic)
- To avoid duplicate order values when programmatically creating rules, you can implement a mechanism to dynamically assign unique order values. Here are some strategies:
- Incremental Order Assignment: Start with an initial order value and increment it for each new rule.
- Check Existing Rules: Retrieve the existing rules and their order values, then assign a new order value that is not already in use.
- Use a Hashing Mechanism: Generate a unique hash based on rule properties and use it as the order value.
By ensuring that each rule has a unique order value, you can avoid the error and ensure that your rules are processed correctly.
Please let us know if any further questions
Kindly accept answer if it helps
Thanks
Deepanshu