I have a terraform script to create an ASP.NET Core 9.0 on Azure using the following snippet:
resource "azurerm_linux_web_app" "webapp" {
name = var.management_portal.name
location = var.resource_group.location
resource_group_name = var.resource_group.name
service_plan_id = azurerm_service_plan.service_plan.id
https_only = true
site_config {
application_stack {
dotnet_version = "9.0"
}
always_on = true
}
app_settings = {
"WEBSITES_ENABLE_APP_SERVICE_STORAGE" = "false"
}
}
After running the script and deploying the asp.net application using Azure DevOps pipeline, I realized the following entries were not populated by terraform causing the app not to run; and, what you see on this screenshot are manually selected and applied by myself:
After choosing the entries above the asp.net core's web page appeared on the browser. How to resolve this issue such that a manual intervention to set the stack settings should not be necessary.
This my provider:
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "4.25.0"
}
}
