0
votes

I need to create a few Azure Function in the same region and same resourge group in Azure.

On the docs I read:

Function apps in the same region can be assigned to the same Consumption plan

But when I´m creating a new Functio App there´s no option to assign the new function to the same consumption plan that was created before.

consumption

As you can see, there´s no option to select an existing plan, even in the same region.

How can I prevent to create a new AppServicePlan(consumption) for each new function that I create?

2
I don’t think there is a way actually, been looking for this myselfMatt Douhan

2 Answers

3
votes

This is not possible through the Azure portal, so you'll need to use the Azure CLI, powershell or ARM templates if you want the function to use an existing App Plan.

However, this doesn't really matter for this case, since you chose the "Consumption" plan type, no additional costs will be charged by creating a new plan of this type. You only pay for the execution times of your functions.

Sharing the app service plan between Azure Functions (or other app service types) only makes sense if you are (already) using a dedicated app service plan for some services. With this type, you basically provision a virtual machine that is hosting your functions. You pay a fixed amount for this (whether your functions are running or not), so to save costs, it would make sense to host multiple app services in the same plan, if the server can handle the load (whether they are Azure Functions or other Azure App Service types).

More info: https://docs.microsoft.com/en-us/azure/azure-functions/functions-scale

EDIT: maybe also good to add, is that you can add multiple functions in the Function app. So you don't need to create a new Azure Function App for each function. You could just group them together in the same Azure Function App

1
votes

just dont use the portal and thats it. use arm templates, use azure powershell, use az cli, etc.