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
389 stars 84 forks source link

[RULE] Deploy VMSS across availability zones with VMSS Flex #2902

Closed jeanchg closed 3 months ago

jeanchg commented 3 months ago

Existing rule

No response

Suggested rule

As per APRL recommendation, when creating VMSS, implement availability zones as a protection measure for your applications and data against the rare event of datacenter failure.

Resource Type microsoft.compute/virtualmachinescalesets Property with expected value _arraylength(zones) > 1

Pillar

Reliability

Additional context

Reliability Hub Create a Virtual Machine Scale Set that uses Availability Zones Update scale set to add availability zones

jeanchg commented 3 months ago

This rule will be used to test against the AVM Bicep VMSS module. @rahalan

BernieWhite commented 3 months ago

@jeanchg The documentation is unclear on the point of flexible vs uniform in your title.

Are we saying this is only a recommendation if the orchestration mode is Flexible?

BenjaminEngeset commented 3 months ago

I can create the rule, but awaiting for alignment before constructing the rule body.

jeanchg commented 3 months ago

checking with @rahalan , will update shortly

BenjaminEngeset commented 3 months ago

Any update @jeanchg?

rahalan commented 3 months ago

@BernieWhite @BenjaminEngeset @jeanchg I see no reason, why this should only apply for flexible. I would suggest to recommend it for uniform as well.