Support for Node.js 14 in Azure Functions is ending June 2024

Naresh Babu 145 Reputation points
2023-07-04T07:56:09.8333333+00:00

Dear Team,

I saw an update from MS that Node.js 14 is end of support by June 2024, here my question is how can I get an inventory list from Azure, Azure Functions which is using Node.js 14? could some one help me on this.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,909 questions
0 comments No comments
{count} votes

Accepted answer
  1. TP 124.7K Reputation points Volunteer Moderator
    2023-07-04T09:53:48.8333333+00:00

    Hi,

    Below code sample will return the name of Function Apps with Node 14 in current subscription. You may test it in Cloud Shell:

    Get-AzFunctionApp|ForEach-Object -Process {if (($_.SiteConfig.LinuxFxVersion -eq "Node|14") -Or ($_.ApplicationSettings.WEBSITE_NODE_DEFAULT_VERSION -eq "~14")) {$_.Name}}
    
    

    Please click Accept Answer if the above was helpful.

    Thanks.

    -TP

    1 person found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. VenkateshDodda-MSFT 24,951 Reputation points Microsoft Employee Moderator
    2023-07-05T09:02:53.5633333+00:00

    @Naresh Babu Based on the above, we have understood that you want to list function app which are running with NodeJs 14 runtime through portal instead of using PowerShell or through Azure CLI.

    • If your function App is running on Linux (either of consumption, elastic premium or through Dedicated app service) plans then you need to focus on LinuxFxVersion property.
    • For Windows (either of consumption, elastic premium or through Dedicated app service) hosted function apps. app setting WEBSITE_NODE_DEFAULT_VERSION will determine the runtime version.

    To achieve your requirement, you can use either Azure resource explorer or create custom Azure policy and by using the below query you can pull the list of function app that are running on Linux plans.

    resources
    | where ['type'] =~ "Microsoft.Web/sites"  and kind =~ "functionapp,linux" and properties.siteProperties.properties contains "Node|14"
    | project name,resourceGroup,subscriptionId
    

    You can refer to sample Aduit policies for function app and try creating your own azure policy based on your requirement.

    In windows function apps, as mentioned earlier the runtime version is dependent on App settings of function app, we cannot use either by azure policy or Graph explorer.

    You need to use the above PowerShell cmdlet shared by @TP to get list of functions app running with Node|14 runtime.

    Get-AzFunctionApp|ForEach-Object -Process {if($_.ApplicationSettings.WEBSITE_NODE_DEFAULT_VERSION -eq "~14"){$_.Name}}
    

    Feel free to reach back to me if you have any further questions on this.

    2 people found this answer helpful.

  2. Andriy Bilous 11,821 Reputation points MVP Volunteer Moderator
    2023-07-04T09:55:29.4333333+00:00

    Hello

    You can use following script to get all the Azure Functions

    $subscriptions = az account list | ConvertFrom-Json
    foreach ($s in $subscriptions) {
    	az account set -s $s.name  
    	$function = Get-AzFunctionApp 
    	foreach ($w in $functions) {
    		$func = az functionapp config show --name $w.Name --resource-group $w.ResourceGroupName | ConvertFrom-Json
    		$func | Where-Object {$_.nodeVersion -eq "14"} |  Select {$_.Name, $_.resourceGroup, $_.nodeVersion}
    	}
    }
    
    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.