Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
This is the code snippet
I am sending the runtime stack and its version using variables.tf
resource "azurerm_linux_function_app" "function_linux" {
count = var.os_type == "Linux" ? 1 : 0
name = pcsfunvtionapp
location = eastus
resource_group_name = RGFunctions
identity {
type = "SystemAssigned"
}
site_config {
always_on = true
#linux_fx_version = var.worker_runtime
}
app_settings = {
"FUNCTIONS_WORKER_RUNTIME" = lower(var.worker_runtime) # e.g. "python"
"Version" = var.runtime_version # e.g. "3.13"
"WEBSITE_VNET_ROUTE_ALL" = "1"
}
tags ={
}
}
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
AI answer
The serviceUnavailable error for the host runtime in your Azure Function App deployment using Terraform can be caused by several factors. Here are some troubleshooting steps you can take:
FUNCTIONS_WORKER_RUNTIME and Version settings in your app_settings are correctly set. For example, if you're using Python, make sure that the var.worker_runtime is set to "python" and that var.runtime_version is set to a valid version like "3.8" or similar.eastus) has sufficient resources available for your function app. Sometimes, resource constraints can lead to service unavailability.always_on set to true, ensure that your app service plan supports this feature. The always_on setting is only available for Basic, Standard, and Premium tiers.By reviewing these areas, you should be able to identify and resolve the serviceUnavailable error for your Azure Function App.
References: