Switch Azure Functions from "Consumption plan" to "Premium plan"

Viewed 2701

Does anybody know, how can you change Azure Functions that are on "consumption plan" to "premium plan"? I cannot redeploy them again, and I need to switch them to a premium plan. I didn't find any relevant manuals how to do it.

enter image description here

1 Answers

You can use azure cli command az resource update.

Note: I have the azure function and premium plan in the same resource group.

1.Get the resource id of your premium plan via azure portal or commands. The screenshot shows how to get resource id via azure portal(Regarding how to Create a Premium plan using azure cli command, you can refer to this section, after step 9.):

enter image description here

2.Then you can use the azure cli command below to update the plan to premium:

az resource update --resource-type "Microsoft.Web/sites" --name "your azure function name" --resource-group "xxx" --set properties.serverFarmId="the resource id from step 1"

The test result as below, and after executing the command, nav to your function app -> and you can see the plan is changed to the premium plan(it may take a few minutes):

enter image description here

By the way, if you don't have azure cli installed locally, you can run these commands from azure portal as per this guide.

Related