Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
Zone redundancy support for App Service plans is determined by the scale unit that the resource group is mapped to, and that mapping is effectively decided by the first App Service plan created in that resource group.
From the documentation:
- Zone redundancy is a property of the scale unit where the App Service plan is deployed.
- When a new App Service plan is created, it is assigned to a scale unit based on the resource group.
- Some scale units support availability zones (and therefore zone redundancy); others do not.
This leads to the behavior described:
- First scenario (works):
- The first plan in the resource group is created with zone redundancy enabled.
- Because zone redundancy is explicitly selected at creation time, the plan is placed on a scale unit that supports availability zones.
- Subsequent plans in the same resource group can be created with zone redundancy either enabled or disabled, because they are all on a scale unit that supports zones.
- Second scenario (fails):
- The first plan in the resource group is created without zone redundancy.
- That first plan is placed on a scale unit that does not support availability zones.
- Zone redundancy is a property of the scale unit, not just the individual plan. Because the scale unit does not support zones, any attempt to create a zone-redundant plan in that same resource group fails with
ZoneRedundancyNotAllowedInResourceGroup.
The documentation explicitly states that:
- If a current App Service plan is in a scale unit that doesn't support zone redundancy, zone redundancy cannot be enabled on that plan.
- When a new App Service plan is created with zone redundancy enabled in a different resource group, it is deployed to a different scale unit.
- Apps and plans cannot move between scale units; redeployment is required.
Therefore, in this situation:
- Yes, to create a zone-redundant App Service plan when the first plan in the existing resource group is non–zone-redundant (and thus on a non–zone-redundant scale unit), a new resource group must be created.
- In that new resource group, create a new App Service plan with zone redundancy explicitly enabled at creation time. This ensures placement on a scale unit that supports availability zones. Additional plans in that resource group can then be created with or without zone redundancy as needed.
References: