Gallery › SQL › Azure built-in policies
[Deprecated]: Require SQL Server version 12.0
Converted Policy Deny Mode Indexed Version 1.0.0-deprecated Deprecated
This policy ensures all SQL servers use version 12.0. This policy is deprecated because it is no longer possible to create an Azure SQL server with any version other than 12.0.
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONSqlVersion12_Deny.json · 39 lines
{
"properties": {
"displayName": "[Deprecated]: Require SQL Server version 12.0",
"policyType": "BuiltIn",
"mode": "Indexed",
"description": "This policy ensures all SQL servers use version 12.0. This policy is deprecated because it is no longer possible to create an Azure SQL server with any version other than 12.0.",
"metadata": {
"version": "1.0.0-deprecated",
"category": "SQL",
"deprecated": true
},
"version": "1.0.0",
"parameters": {},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.Sql/servers"
},
{
"not": {
"field": "Microsoft.Sql/servers/version",
"equals": "12.0"
}
}
]
},
"then": {
"effect": "Deny"
}
},
"versions": [
"1.0.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/464dbb85-3d5f-4a1d-bb09-95a9b5dd19cf",
"name": "464dbb85-3d5f-4a1d-bb09-95a9b5dd19cf"
}Bylaw464dbb85-3d5f-4a1d-bb09-95a9b5dd19cf.bylaw.ps1 · 22 lines
# Converted from SqlVersion12_Deny.json by ConvertTo-Bylaw.
Policy '464dbb85-3d5f-4a1d-bb09-95a9b5dd19cf' {
Properties @{
DisplayName = '[Deprecated]: Require SQL Server version 12.0'
Description = 'This policy ensures all SQL servers use version 12.0. This policy is deprecated because it is no longer possible to create an Azure SQL server with any version other than 12.0.'
Version = '1.0.0-deprecated'
Category = 'SQL'
Deprecated = $true
PolicyVersion = '1.0.0'
Mode = 'Indexed'
}
Resource 'Microsoft.Sql/servers' {
Require 'version is 12.0' {
Field version | Must -Be '12.0'
}
}
Effect Deny
}Source: built-in-policies/policyDefinitions/SQL/SqlVersion12_Deny.json in Azure/azure-policy, under the MIT licence.
Bylaw