Pattern: Use of insecure TLS/SSL policy for Azure App Service
Issue: -
The TLS version being outdated and has known vulnerabilities.
Resolution: Use a more recent TLS/SSL policy for the App Service.
Example of incorrect code:
resource "azurerm_app_service" "bad_example" {
name = "example-app-service"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
app_service_plan_id = azurerm_app_service_plan.example.id
site_config {
min_tls_version = "1.0"
}
}
Example of correct code:
resource "azurerm_app_service" "good_example" {
name = "example-app-service"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
app_service_plan_id = azurerm_app_service_plan.example.id
}