Azure / Azure/bicep-registry-modules
[AVM Module Issue]: avm/res/web/serverfarm default value for zone redundancy for Premium SKUs
- Dominant language
- Bicep
- Stars
- 736
- Forks
- 564
- Avg merge
- 3d 15h
- Merged PRs (30d)
- 30
Description
### Check for previous/existing GitHub issues
- [x] I have checked for previous/existing GitHub issues
### Issue Type?
I'm not sure
### Module Name
avm/res/web/serverfarm
### (Optional) Module Version
0.7.0
### Description
As stated in the Readme [here](https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/web/serverfarm#parameter-zoneredundant), the zoneRedundant parameter defaults to `true` when a Premium SKU is being deployed.
I think that having a "dynamic" approach to a default value is not ideal, especially with such a critical parameter.
It can also lead to some deployment-blocking issues: if you try to deploy a Premium SKU with this value defaulting to `true` and you don't have sufficient Quota, the deployment fails with an error that correctly mentions an issue with Quotas - see error extract below:
```
SubscriptionIsOverQuotaForSku","message":"Operation cannot be completed without additional quota.
Additional details - Location: West Europe
Current Limit (PremiumV3 VMs): 0
Current Usage: 0
Amount required for this deployment (PremiumV3 VMs): 3
(Minimum) New Limit that you should request to enable this deployment: 3.
Note that if you experience multiple scaling operations failing (in addition to this one) and need to accommodate the aggregate quota requirements of these operations, you will need to request a higher quota limit than the one currently displayed
```
Retrying the same deployment with zone redundancy explicitly set to `false` works: the issue with this error message is that it doesn't point out that the Quota is needed **for a zone redundant deployment**.
This is aggravated by the fact that working with App Service Quota management (being also in Public Preview) on the portal is quite confusing, since it doesn't allow any differentiation related to zone redundancy. It looks like quotas for non-zone redundant deployments are not necessary, for sure they aren't visible on the portal. For this part I'll open a parallel feedback ticket related to the portal experience.
I understand that the last issues mentioned are unrelated to the AVM and that the default value approach is kind of subjective, but at the very least the error message could be improved to be clearer.
### (Optional) Correlation Id
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.