Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save andrewmatveychuk/80e2b2406bf963fad996f6c1704eb7d4 to your computer and use it in GitHub Desktop.
Save andrewmatveychuk/80e2b2406bf963fad996f6c1704eb7d4 to your computer and use it in GitHub Desktop.
Sample Azure Policy effect to configure Azure Hybrid Benefit usage by Windows Server VMs
"then": {
"effect": "Modify",
"details": {
"roleDefinitionIds": [
"/providers/Microsoft.Authorization/roleDefinitions/9980e02c-c2be-4d73-94e8-173b1dc7cf3c"
],
"conflictEffect": "Audit",
"operations": [
{
"operation": "addOrReplace",
"field": "Microsoft.Compute/virtualMachines/licenseType",
"value": "Windows_Server"
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment