Skip to content

Instantly share code, notes, and snippets.

@andrewmatveychuk
Created November 28, 2022 16:54
Show Gist options
  • Save andrewmatveychuk/7b0b3f3b922b1724985371d6330a0d5d to your computer and use it in GitHub Desktop.
Save andrewmatveychuk/7b0b3f3b922b1724985371d6330a0d5d to your computer and use it in GitHub Desktop.
Sample Azure Policy rule to evaluate SQL Server VMs for Azure Hybrid Benefit usage
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.SqlVirtualMachine/SqlVirtualMachines"
},
{
"field": "Microsoft.SqlVirtualMachine/SqlVirtualMachines/sqlImageSku",
"in": [
"Standard",
"Enterprise"
]
},
{
"field": "Microsoft.SqlVirtualMachine/SqlVirtualMachines/sqlServerLicenseType",
"notEquals": "AHUB"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment