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

IaaS SQL Servers only use premium disks #9

Closed BernieWhite closed 1 year ago

BernieWhite commented 5 years ago

Check that IaaS SQL VMs only use premium disk.

BenjaminEngeset commented 1 year ago

Still relevant to this day.

Premium ssd v2 is suited for sql server in general, but currently it has so many obscur limitations so i dont think its a really good idea to recommend this to customers, so fail on premium ssd v2 as well even if the customer has configured it, or let it slide thru?

BenjaminEngeset commented 1 year ago

@BernieWhite

I'm also wondering if we should target Microsoft.Compute/virtualMachines and focus on the publisher MicrosoftSQLServer, but that is probably not safe enough to assume Microsoft.SqlVirtualMachine/sqlVirtualMachines.

Perhaps there is a way in PSRule to get both resources onto the pipeline in the same TargetObject?

BernieWhite commented 1 year ago

@bengeset96 The original thought was related to performance efficiency. I think if a customer uses Premium, Premium V2 or ultra-disks that addresses the rule. A recommendation to the premium SSD or greater is enough.

BernieWhite commented 1 year ago

@BernieWhite

I'm also wondering if we should target Microsoft.Compute/virtualMachines and focus on the publisher MicrosoftSQLServer, but that is probably not safe enough to assume Microsoft.SqlVirtualMachine/sqlVirtualMachines.

Perhaps there is a way in PSRule to get both resources onto the pipeline in the same TargetObject?

Targeting by publisher is probably the best. It's not really possible to see both related objects.

BenjaminEngeset commented 1 year ago

@BernieWhite

Sounds great. This means that we will be able to test osDisk and dataDisks defined within storageProfile.

We wont be able to target disks from Microsoft.Compute/disks or Microsoft.Storage/storageAccounts I assume since there is nothing here that gives us the information we're seeking, but that option is most likely not so widely used for this scenario.