How to set Stack Settings for Azure Web App using Pulumi
A quick post on how to set Stack Settings for Azure Web App. While this setting is optional, it can cause unexpected behaviour.
For one of my projects, I was deploying an Azure Linux Web App using Pulumi. However, I could not set Stack
as Node
no matter what setting I set.
Azure and Pulumi documentation suggested that linuxFxVersion
under siteConfig
should set the Stack, but none of the values I provided (Node|20
, ~20
) worked.
Finally, this Azure CLI flag gave me the correct value which made it work.
az webapp list-runtimes --os linux
This will output something as below.
As you can see, the correct value for a NodeJS app is NODE:20-lts
.
Setting that to linuxFxVersion
will correctly configure the Azure Web App.
That is it! This brief post is aimed at helping you save time by avoiding hours of trial and error :-)