Pattern: Missing use of HTTP2 for Azure Function App
Issue: -
Use the latest version of HTTP to ensure you are benefiting from security fixes.
Resolution: use the latest version of HTTP.
Example of incorrect code:
resource "azurerm_function_app" "bad_example" {
name = "example-function-app"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
app_service_plan_id = azurerm_app_service_plan.example.id
}
Example of correct code:
resource "azurerm_function_app" "good_example" {
name = "example-function-app"
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 {
http2_enabled = true
}
}