I am just wondering if there is a path to migrate a Function App that is hosted on a Dedicated App Service Plan to a Premium Plan?
I have tried using the Azure CLI to change the underlying App Service Plan but am getting this message:
Your functionapp is not using a Consumption or an Elastic Premium
plan. Currently the switch is only allowed between a Consumption or an
Elastic Premium plan.
Is there any other way other than completely recreating the Function App to do this?
Function apps using the Dedicated App Service plan can't be changed to any other plan. This may be possible in the future, but not for now. You have to create a new function app in a different hosting plan and update/deploy your code.
Just like the error says, you can only switch between Consumption and Premium plans by changing the plan property of the function app resource.
References:
How to Migrate from Consumption Plan to App Service Plan (and vice versa)
Change Function app hosting plan
Related
I am trying to create an Azure Function App. Before that, I created a free App Service plan. Now, as I am creating the function app, I don't see that plan in the dropdown, even though I use the same resource group, operating system and region for both plan and the function app. Thus I cannot create the function app. What am I missing?
As Specified in this MS Doc of Azure Functions Dedicated Plan, all other SKU's like Basic to Premium are allowed except F1 (Free Tier) in Azure Functions - Dedicated Hosting Plan:
Practical:
Result:
Background
My team is implementing disaster recovery via zone redundancy for our function apps. We currently have several function apps on a consumption app service plan. All of the apps and the service plan are in the same Azure region and in the same resource group. All of the apps run on Windows.
We need an elastic premium app service plan to enable zone redundancy for our function apps. As far as we can tell, the only way to create an elastic premium app service plan is to create a new function app.
Problem
When we use the Azure portal to create a new function app with a new elastic premium app service plan, the deployment fails.
Operation details > Status message gives some error details:
Requested feature is not available in resource group...
Try using a different resource group or create a new one.
How do we create a new elastic premium app service plan in our resource group?
We want to avoid moving our function apps to a different resource group if possible.
Related documentation
Azure Functions Premium plan
Create a Premium plan function app in the Azure portal
Create Azure website (app service) within a resource group with service plan with Powershell
How to deploy an Azure Functions App when the Service plan is in a different Resource Group
Unable to create Linux Function Apps (Consumption plan) and Linux App Service Plans and in the same Resource Group
Requested feature is not available in resource group...
Solution
We eventually figured out a workaround for moving our function apps to an elastic premium app service plan with zone redundancy:
Create a new resource group in the same Azure region as our function apps.
Create a new dummy fxn app in the new resource group, and choose an elastic premium plan during app creation. Zone redundancy will be enabled by default.
Delete the dummy fxn app and storage account. (Azure requires a storage account with each function app.)
Move the elastic premium plan to the old resource group.
Update the ARM template in our deployment pipeline to use the new elastic premium app service plan.
Delete the function apps. (Make sure your deployment pipeline works before doing this! We actually deleted one function app at a time.)
Redeploy the function apps via ARM template in the deployment pipeline.
What is different azure function app and app service plan ?
I think;
Function app is a core layer - where hosted code and execute
App service plan is higher layer of function app - it can be covering function app. For example, it can cover network layer for function app.
But I see in function app has Vnet integration feature and app service plan has virtual network integration too.
I am confused with it.
What is different azure function app and app service plan in network part ?
p/s: I have created virtual network and assign app service plan to that VNET. then I deployed a function app into app service, but this function does not stay in that VNET. how to verify that ?
There are a few things that will help you to understand this little better and you can also verify through Azure Portal. After all, it's all the hosting plan you want to use.
App Service Plan: This is something a root consumption plan you are paying for. kind of resources you want for much of your work. (I would say - choose this wisely)
Function App: This resource has 3-4 different kinds of hosting plan options
(i) Consumption plan (ii) Premium Plan (iii) App Service Plan (iV) ASE.
now, if you have notice - App Service Plan (item iii) is also one of the options. Not necessary that is only an option. So, in other words; Function App can sit outside the App Service plan (like Consumption plan) where it will deploy separately.
At this moment Question might come - what could be a difference. for that visit Microsoft's well-documented link here which states you are paying and resources are getting allocated during the function real-use whereas, App Service Plan uses your own app Dedicated service plan which you already have decided a lot earlier in the cycle.
Your last question - How do we confirm? well, Open App Service Plan inside Azure Portal and there is an essential section where you will find App(s)/ Slot(s). Click on that you will see how many app services/ function apps already sharing that specific App Service Plan like below:
An App Service Plan is the environment which you pay for.
You can then run different workloads including function apps within the App Service Plan. Grouping workloads in a single App Service Plan can save you money compared with having different App Service Plans for each App Function.
The VNET configuration is both at the App Service Plan and the App Service / Function App level. You do not necessarily want all App Services / Function Apps in the same App Service Plan to run on the same VNET.
The consumption plan is based on function runtime, which means only when your function is running else no.
Premium plan you need to specify prewarmed instances that will always be online. so it's kind of minimum fixed billing and it can go beyond if you use it for resources.
The app service plan (Dedicated plan) is Running function like other apps. It will use the same app service plan.
Refer to this documentation for more details.
I have several App services, some of them are on a Free tier and some of them are on a Shared tier.
For some reason Azure is charging both plans for each App Service and I don't undestand why.
Also, I checked their App Service Plan and it is on a Free Tier.
Any insights on this?
Try to list all your App Service Plans (the compute behind an App Service) in the Azure Portal. ("All services" and the App Service Plans in the navigation) This will give you an overview of App Service Plans and how many "apps" you have on them. Technically you can have an App Service Plan with no apps but with cost.
When you create new App Service (Web, Api ect.) you can choose to create a new App Service Plan or re-use an existing. You can therefore end up with re-creating new App Services Plans (with billing also) everytime you create and App Service.
Also be aware that when you scale out (more instances) you are billed for every instance (as a seperate App Service Plan).
List of App Service plans in the Azure Portal
Could it be that your App Service has a connected service (like Application Insights) that exists on another plan? Or if you have a deployment slot on the App Service that belongs to another plan?
Will compute be available to an Azure Function app if it is assigned to an App Service Plan that has no App Services in it?
Yes, and that is in fact the way all Azure Function apps are create:
The App Service Plan gets created first
Then the FUnction App gets created in the App Service Plan
This applies to both Consumption and App Service Plan Function Apps
well, the easiest way to know is to create it? that would probably take as much time as asking this question, but I don't see why it would not work.