Azure / PSRule.Rules.Azure

Rules to validate Azure resources and infrastructure as code (IaC) using PSRule.
https://azure.github.io/PSRule.Rules.Azure/
MIT License
400 stars 87 forks source link

[RULE] Enable HA with zone redundancy #2914

Closed jeanchg closed 5 months ago

jeanchg commented 6 months ago

Existing rule

No response

Suggested rule

As per APRL recommendation, enable HA with zone redundancy on flexible server instances to deploy a standby replica in a different zone, offering automatic failover capability for improved reliability and disaster recovery.

Resource Type: microsoft.dbformysql/flexibleservers Properties and expected values: highAvailability.mode == "ZoneRedundant"

Pillar

Reliability

Additional context

High availability concepts in Azure Database for MySQL - Flexible Server

BenjaminEngeset commented 6 months ago

We cannot implement the logic to account for the availability of this feature in specific regions. However, we can clarify in the rule documentation that this feature is only available in regions that support multiple availability zones and zone-redundant Premium file shares. This clarification will ensure that users understand the feature’s limitations and that it will not work in all scenarios.

BernieWhite commented 6 months ago

@BenjaminEngeset See this example. https://github.com/azure/psrule.rules.azure/blob/main/src/PSRule.Rules.Azure/rules/Azure.ContainerApp.Rule.ps1#L21-L33

We can use support for AZ in VMSS as a guide because it is a foundational service that needs to be present before AZ support is offered in PaaS services that build on top of these features.

But indeed call out that there might be false positives in the docs.

BenjaminEngeset commented 6 months ago

@BenjaminEngeset See this example. https://github.com/azure/psrule.rules.azure/blob/main/src/PSRule.Rules.Azure/rules/Azure.ContainerApp.Rule.ps1#L21-L33

We can use support for AZ in VMSS as a guide because it is a foundational service that needs to be present before AZ support is offered in PaaS services that build on top of these features.

But indeed call out that there might be false positives in the docs.

I understand! Great news. My earlier comment can now be disregarded since I have this information.

I'll create the rule.