Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,911 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
i have tried below code
resource "azurerm_function_app" "example" {
name = var.function_app_name
location = "West US"
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
version = "~3"
os_type = "linux"
site_config {
always_on = true
linux_fx_version = "DOTNET|5.0"
}
}
also tried this i have tried
site_config {
always_on = true
dotnet_framework_version = "8.0"
} but none of them are working
I'm not sure that resource provider is the current Terraform supported one. The Terraform HashiCorp docs point to this:
All the information is listed here for the site_config variables: https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/linux_function_app
"A site_config
block supports the following:
always_on
- (Optional) If this Linux Web App is Always On enabled. Defaults to false
."Using this provider instead:
resource "azurerm_linux_function_app"
Here's an example site_config
:
site_config {
always_on = "true"
ftps_state = "Disabled"
http2_enabled = true
minimum_tls_version = "1.2"
application_stack {
dotnet_version = "8.0"
}
}
Hopefully that will then solve the issue. If it does, please mark this as the accepted answer.