The parameter LinuxFxVersion has an invalid value

2024, Aug 11

The error "The parameter LinuxFxVersion has an invalid value" can be one of those challenging Bicep/ARM errors, that can consume some time until you figure it out. I hope I can alleviate some pain with this post.

Before anything else

Open the command line and run this:

az functionapp list-runtimes --os linux --query "[].{stack:join(' ', [runtime, version]), LinuxFxVersion:linux_fx_version, SupportedFunctionsVersions:to_string(supported_functions_versions[])}" --output table

You are going to get the following table output:

Stack             LinuxFxVersion         SupportedFunctionsVersions
dotnet-isolated 8 DOTNET-ISOLATED 8.0    
dotnet-isolated 7 DOTNET-ISOLATED 7.0    
dotnet-isolated 6 DOTNET-ISOLATED 6.0    
dotnet 8           DOTNET 8.0              
dotnet 6           DOTNET 6.0              
node 20           Node 20                
node 18           Node 18                
python 3.11       Python 3.11            
python 3.10       Python 3.10            
python 3.9         Python 3.9              
python 3.8         Python 3.8              
python 3.7         Python 3.7              
java 21.0         Java 21                
java 17.0         Java 17                
java 11.0         Java 11                
java 8.0           Java 8                  
powershell 7.4     PowerShell 7.4          
powershell 7.2     PowerShell 7.2          
custom                                     ["4"]                      

Make sure that the value you reference on your Bicep/ARM file is available on LinuxFxVersion.

Still facing the issue?

So your Bicep/ARM is probably not compliant. If you want to eliminate any other dramas, use one of these quickstart templates:

https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.web

If you are trying to deploy an Azure Functions on Linux Consumption, here is a great example:

https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.web/function-app-linux-consumption

Please feel free to add comments on your specific issues or findings so that I can cover more ground with other troubleshooting scenarios. This is going to be a living document.