Review the minimum TLS version for Azure SQL

Ensure database clients use TLS 1.2 or later.

Description

Azure SQL Database requires TLS 1.2 or later. Older Terraform files may still specify TLS 1.1.

Potential impact

Clients that support only TLS 1.0 or 1.1 cannot connect.

Remediation

Set minimum_tls_version = "1.2" on the logical server. Test a connection with each application driver and update any driver that cannot negotiate TLS 1.2 or later.

Examples

The first excerpt shows the retired TLS 1.1 setting. The second sets the supported minimum.

Before

hcl
resource "azurerm_mssql_server" "example" {
  name                         = "example-mssql-server"
  resource_group_name          = azurerm_resource_group.example.name
  location                     = azurerm_resource_group.example.location
  version                      = "12.0"
  administrator_login          = var.sql_admin
  administrator_login_password = var.sql_password
  minimum_tls_version          = "1.1"
}

After

hcl
resource "azurerm_mssql_server" "example" {
  name                         = "example-mssql-server"
  resource_group_name          = azurerm_resource_group.example.name
  location                     = azurerm_resource_group.example.location
  version                      = "12.0"
  administrator_login          = var.sql_admin
  administrator_login_password = var.sql_password
  minimum_tls_version          = "1.2"
}

References