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

feat(new): Added Azure.AppService.AvailabilityZone #2984

Closed BenjaminEngeset closed 1 month ago

BenjaminEngeset commented 1 month ago

PR Summary

Fixes #2964

Added Azure.AppService.AvailabilityZone.

PR Checklist

BenjaminEngeset commented 1 month ago

Ready for review @BernieWhite.

I was initially planning to create the rule for ASE separately, both for customer readability and for our internal readability/handling with the test suite we use. But have not started on it yet before we decide together.

What do you think? Looking forward to your feedback.

BernieWhite commented 1 month ago

Ready for review @BernieWhite.

I was initially planning to create the rule for ASE separately, both for customer readability and for our internal readability/handling with the test suite we use. But have not started on it yet before we decide together.

What do you think? Looking forward to your feedback.

Makes sense to me, that would be the preferred approach to have a separate ASE rule.

BenjaminEngeset commented 1 month ago

Ready for review @BernieWhite. I was initially planning to create the rule for ASE separately, both for customer readability and for our internal readability/handling with the test suite we use. But have not started on it yet before we decide together. What do you think? Looking forward to your feedback.

Makes sense to me, that would be the preferred approach to have a separate ASE rule.

Great, the other rule will be included in a separate PR.

BenjaminEngeset commented 1 month ago

Great feedback @BernieWhite. The requested changes made sense. I have adjusted accordingly now.

Do we need to use the AllOf here or will it work as it is now?

BernieWhite commented 1 month ago

Great feedback @BernieWhite. The requested changes made sense. I have adjusted accordingly now.

Do we need to use the AllOf here or will it work as it is now?

No, all good. PowerShell rules will consume all assert statements similar to AllOf by default, unless an assert used return ... which would abort the remaining code early.

BenjaminEngeset commented 1 month ago

Test was failing due to the change in the rule body, I have updated it now @BernieWhite. Also adjusted the localized string to match the default behavior of three availability zones by default.

Are we ready for merging this now?