Description
Choose the minimum TLS version for inbound Function App connections. New apps default to 1.2, so check the effective value when the setting is omitted.
Potential impact
A low minimum can admit clients using older TLS. The function and its SCM deployment endpoint have separate settings, so one can fall below your policy even if the other meets it.
Remediation
Set an approved minimum of 1.2 or higher. Consider requiring 1.3 after checking client compatibility. Test both the app and SCM endpoints with an allowed version and one below their minimum. Check HTTPS enforcement separately.
Examples
The first example sets site_config.min_tls_version to 1.1 on an AzureRM 3.x Function App. The second sets site_config.minimum_tls_version to 1.3 on a Linux Function App.
Before
resource "azurerm_function_app" "example" {
name = "test-azure-functions"
location = azurerm_resource_group.example.location
app_service_plan_id = azurerm_app_service_plan.example.id
site_config {
dotnet_framework_version = "v4.0"
scm_type = "LocalGit"
min_tls_version = "1.1"
}
}
After
resource "azurerm_linux_function_app" "example" {
name = "test-azure-functions"
location = azurerm_resource_group.example.location
service_plan_id = azurerm_service_plan.example.id
site_config {
minimum_tls_version = "1.3"
}
}
To migrate an existing app, review its Terraform state and configuration and supply the resource group and storage settings. The second example sets only the function endpoint’s minimum.