· Pavel Tuma · Debug · 2 min read
Azure App Service cryptic error
What a LinuxFxVersion cryptic error message could really mean

Azure App Service
We were developing Terraform modules to provision various Azure resources in compliance with client’s organization’s defined policies. For Azure App Service, we designed a modular architecture consisting of three distinct modules:
- Module that creates App Service Plan and optionally App Service Environment (ASE) if needed.
- Module that creates Web Apps within previously created App Service Plan.
- Module that creates Function Apps within previously created App Service Plan.
The LinuxFxVersion Invalid Value Mystery
During testing of our module deployments, Terraform returned an enigmatic error from Azure when creating the azurerm_linux_web_app resource:
performing CreateOrUpdate: unexpected status 400 (400 Bad Request) with response: {
"Code": "BadRequest",
"Message": "The parameter LinuxFxVersion has an invalid value.",
...
}
This cryptic error message provided little guidance for troubleshooting. I initially focused on testing various Linux App application_stack
configurations as outlined in the Terraform documentation. I even consulted several AI agents, but their suggestions ranged from non-existent to completely nonsensical Terraform arguments.
The Root Cause: OS Type Mismatch
The solution emerged when I completely removed the application_stack
block (which is optional). The underlying issue was that I was attempting to create a Linux web app on a Windows App Service plan.
The App Service plan’s kind
parameter is optional and defaults to Windows
when not specified, which was my case. I suspect a similar error would occur with WindowsFxVersion
if attempting the reverse scenario (Windows web app on Linux App Service plan).