MrRobot
MrRobot

Reputation: 82

Azure Service Plan - Convert Consumption App to Premium App

Title basically says it all. I have a function app on a consumption plan that I need to put onto a P2V2. Is it possible to convert the consumption plan or do I need to just redeploy to a new resource group?

Upvotes: 2

Views: 1274

Answers (2)

Sunny Sharma
Sunny Sharma

Reputation: 4954

Try this:

  1. Create new AppService plan

  2. Open CloudShell (PowerShell)

  3. Run commands

    • Select-AzureRmSubscription -SubscriptionId "[id]"
    • Set-AzureRmWebApp -Name "[function name]" -ResourceGroupName "[resource group]" -AppServicePlan "[new app service plan name]"

source: https://github.com/Azure/Azure-Functions/issues/155#issuecomment-619980271 or direct at GitHub.


To do vice-versa, move functions from App Service plan to a Consumption Plan, Use the Azure Resource Explorer:

Source: https://www.gitmemory.com/issue/Azure/Azure-Functions/155/747559677 I was able to move back my Function from App Service Plan to Consumption plan by using the https://resources.azure.com/ website.

Enter edit mode, find your Function App and change the following:

{
  serverFarmId: "..../<your-consumption-app-service-name>"
  ...
  // Scroll a bit down
  sku: "Dynamic"
}
Update the resource and you are done.

Make sure that you turn Always On off in the App Service Plan settings before the resource update to make this work.

Upvotes: 3

Bryan Trach-MSFT
Bryan Trach-MSFT

Reputation: 880

Great question MrRobot. Unfortunately, there is no official way to move your consumption based Function App into a dedicated App Service Plan (Basic, Standard, P2v2, etc.). You will have to redeploy your settings into a new Function App that was created using the dedicated hardware.

Please let me know if you have any further questions or concerns.

Edit: To add additional clarity, I'd suggest looking at this for information on how to easily copy your Function App.

Also, switching is available to some customers but the number of customer is so small due to the requirement that your app was deployed to a web space that supports P2v2, which again is a small group. For an example on switching, check here. If you're unable to create a P2v2 Function App in the resource group of your consumption based Function App, you are not likely eligible to use this solution and would need to manually deploy to a dedicated function app.

Upvotes: 2

Related Questions