azureazure-functionsazure-web-app-serviceazure-resource-group

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?


Solution

  • 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.