Skip to content

Azure App Service Web app does not use the latest PHP version

Description

Azure App Service web applications developed with the PHP should use the latest available version of PHP to ensure the latest security fixes are in use.

Fix - Buildtime

Terraform

  • Resource: azurerm_app_service
  • Argument: php_version - (Optional) The version of PHP to use in this App Service. Possible values are 5.5, 5.6, 7.0, 7.1, 7.2, 7.3 and 7.4.
resource "azurerm_app_service" "example" {
  ...
+  site_config {
+    php_version = "7.4"
  }
}