Ensure app service enables detailed error messages

Error: App service disables detailed error messages

Bridgecrew Policy ID: BC_AZR_LOGGING_9
Checkov Check ID: CKV_AZURE_65
Severity: LOW

App service disables detailed error messages

Description

Detailed error messages provide more information about an error that occurs in your app, such as the error code, the line of code where the error occurred, and a description of the error. This information can be very useful for debugging issues with your app and identifying the root cause of the problem.

Fix - Buildtime

Terraform

  • Resource: azurerm_app_service
  • Argument: detailed_error_messages_enabled
resource "azurerm_app_service" "example" {
             ...
+            logs {
+               detailed_error_messages_enabled = true
+            }
             ...
    }