Possible to configure Health Check for Azure Functions with Terraform?

Viewed 898
1 Answers

Health Check gets automatically enabled if you set the path for health check under site_config block. But there is no parameter to configure the load balancing time from terraform.

I tested it by adding the site_config block with health_check_path:

resource "azurerm_function_app" "example" {
  name                       = "terraform-azure-functions"
  location                   = azurerm_resource_group.example.location
  resource_group_name        = azurerm_resource_group.example.name
  app_service_plan_id        = azurerm_app_service_plan.example.id
  storage_account_name       = azurerm_storage_account.example.name
  storage_account_access_key = azurerm_storage_account.example.primary_access_key
  site_config{
  health_check_path          = "/api/health" # need to configure for enabling Health check
  }
}

Outputs:

enter image description here

enter image description here

Related