Gallery › SQL › Azure built-in policies
SQL Managed Instance should have the minimal TLS version of 1.2
Converted Policy Audit Disabled Mode Indexed Version 1.0.1
Setting minimal TLS version to 1.2 improves security by ensuring your SQL Managed Instance can only be accessed from clients using TLS 1.2. Using versions of TLS less than 1.2 is not recommended since they have well documented security vulnerabilities.
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONSqlManagedInstance_MiniumTLSVersion_Audit.json · 57 lines
{
"properties": {
"displayName": "SQL Managed Instance should have the minimal TLS version of 1.2",
"description": "Setting minimal TLS version to 1.2 improves security by ensuring your SQL Managed Instance can only be accessed from clients using TLS 1.2. Using versions of TLS less than 1.2 is not recommended since they have well documented security vulnerabilities.",
"policyType": "BuiltIn",
"mode": "Indexed",
"metadata": {
"version": "1.0.1",
"category": "SQL"
},
"version": "1.0.1",
"parameters": {
"effect": {
"type": "String",
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
},
"allowedValues": [
"Audit",
"Disabled"
],
"defaultValue": "Audit"
}
},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.Sql/managedInstances"
},
{
"anyOf": [
{
"field": "Microsoft.Sql/managedInstances/minimalTlsVersion",
"exists": false
},
{
"field": "Microsoft.Sql/managedInstances/minimalTlsVersion",
"notEquals": "1.2"
}
]
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
},
"versions": [
"1.0.1"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/a8793640-60f7-487c-b5c3-1d37215905c4",
"name": "a8793640-60f7-487c-b5c3-1d37215905c4"
}Bylawa8793640-60f7-487c-b5c3-1d37215905c4.bylaw.ps1 · 32 lines
# Converted from SqlManagedInstance_MiniumTLSVersion_Audit.json by ConvertTo-Bylaw.
Policy 'a8793640-60f7-487c-b5c3-1d37215905c4' {
Properties @{
DisplayName = 'SQL Managed Instance should have the minimal TLS version of 1.2'
Description = 'Setting minimal TLS version to 1.2 improves security by ensuring your SQL Managed Instance can only be accessed from clients using TLS 1.2. Using versions of TLS less than 1.2 is not recommended since they have well documented security vulnerabilities.'
Version = '1.0.1'
Category = 'SQL'
PolicyVersion = '1.0.1'
Mode = 'Indexed'
}
Parameter Effect @{
AllowedValues = @('Audit', 'Disabled')
Default = 'Audit'
DisplayName = 'Effect'
Description = 'Enable or disable the execution of the policy'
}
Resource 'Microsoft.Sql/managedInstances' {
Require 'minimalTlsVersion exists' {
Field minimalTlsVersion | Must -Exist
}
Require 'minimalTlsVersion is 1.2' {
Field minimalTlsVersion | Must -Be '1.2'
}
}
Effect (Param Effect)
}Source: built-in-policies/policyDefinitions/SQL/SqlManagedInstance_MiniumTLSVersion_Audit.json in Azure/azure-policy, under the MIT licence.
Bylaw