I have an existing Azure function with Consumption plan, however, I need to move it to Premium Plan. While creating the function app, I selected linux for the OS.
So far, I created a premium plan and then running the following through azure-cli:
az functionapp update --name <name-of-the-app> --resource-group <resource-group> --plan <premium-plan>
and it gives me the following message:
This feature currently supports windows to windows plan migrations. For other migrations, please redeploy.
Question:
- Is there a way to update/move from consumption plan to premium plan without redeploying it?
- If not, and if the only option I have is to redeploy, is it possible to clone the functions from my existing app?
2
Answers
Found a solution. You can do it by using
az resource update
command. Official Documentation / GitHubThere are two ways that you can do it:
Using UI for Azure Resources (https://resources.azure.com/)
Using Azure CLI
brew install azure-cli
(macOS)az login
az resource update --resource-type "Microsoft.Web/sites" --name <your-app> --resource-group <your-resource-group> --set properties.numOfWorkers=1
az resource update --resource-type "Microsoft.Web/sites" --name <your-app> --resource-group <your-resource-group> --set properties.serverFarmId=<premium-plan-resource-id>
As of now, this issue – Moving the Azure Linux Function App from Consumption Hosting Plan to Premium Hosting Plan is Open in the GitHub.
This is marked as a feature request.
Even Migration of Consumption Plan to Dedicated Plan is in Open Issue in the GitHub, JeffHollan given a manual approach to migrate, but he too recommended the solution – creating a new app and re-publishing to it.