Share App Service plan in different azure resource group - azure

I have two web apps in different Resource Groups. I want to use a shared App Service Plan. Please guide how this can be done, When I try to use "Change Service Plan" I can not see another resource group service plan. Both Resource groups are in same region. When I try to create a App Service Plan I can not see option as a shared resource.

I am too late for the show, but still - it's possible to at least CREATE an App Service with App Service Plan from another resource group (not geographical region though).
You can pick up some details from here:
https://praveenkumarsreeram.com/2019/09/11/share-azure-app-service-plan-across-resource-groups/

It is not possible to move App Service to App Service plan in another resource group.
You can move an app to another App Service plan, as long as the source
plan and the target plan are in the same resource group and
geographical region.
Additional Info:
Azure deploys each new App Service plan into a deployment unit,
internally called a webspace. Each region can have many webspaces, but
your app can only move between plans that are created in the same
webspace. An App Service Environment is an isolated webspace, so apps
can be moved between plans in the same App Service Environment, but
not between plans in different App Service Environments.
You can’t specify the webspace you want when creating a plan, but it’s
possible to ensure that a plan is created in the same webspace as an
existing plan. In brief, all plans created with the same resource
group and region combination are deployed into the same webspace. For
example, if you created a plan in resource group A and region B, then
any plan you subsequently create in resource group A and region B is
deployed into the same webspace. Note that plans can’t move webspaces
after they’re created, so you can’t move a plan into “the same
webspace” as another plan by moving it to another resource group.
Ref: https://learn.microsoft.com/en-us/azure/app-service/app-service-plan-manage#move-an-app-to-another-app-service-plan

Related

"Requested feature is not available in resource group..." when creating a new function app with a new app service plan

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.

Move Azure Web Apps into new Azure App Service Plan?

I have two Azure web apps that are in the same resource group but have two different app service plans.
web-app-1, in resource group web-app-group, has app service plan web-app-1-plan
web-app-2, in resource group web-app-group, has app service plan web-app-2-plan
I created a new app service plan called “web-app-3-plan”, in resource group web-app-group, which was created after the two web apps. Now I want to move both web apps into the new app service plan. All three plans are in the same region (West US) but have different pricing tiers (which shouldn’t matter).
When I go to web-app-1 and select “Change App Service plan” I only see the current plan in the dropdown list and an option to create a new plan (that starts with ASP-).
How do I move my web apps into “web-app-3-plan”, my new plan?
Thanks for contributing to Stack Overflow.
I tried to replicate your issue, and I was able to move the Web App to New ASP(App Service Plan) without any issues. Attached the screenshot for the same.
And after investigating your issue further,
The reason this might be occurring is because the App Service Plan is tied to a different webspace than the original App Service Plan of the web app, even though the newly created App Service Plan was moved to the same Resource Group.
What you can do to resolve the issue is, delete the newly created App Service Plan, and then create the new App Service Plan in the same Resource Group rather than moving it to the Resource Group( if you have done it) . This will ensure the App Service Plans are tied to the same webspace (on the same Resource Group and the same region).
Please refer to the below doc for more reference : Move an App to another App Service Plan
I hope this information helps.

Azure Functions Docker Deployment Linux workers are not available in resource group

Trying to deploy a nginix container from Azure Container Registry through function app,
Getting an error as,
Linux workers are not available in resource group
How to enable linux workers to a resource group?
Dockerfile for deployment,
FROM nginx
COPY dist /usr/share/nginx/html
Seems like you can't have linux and windows resources in the same resource group
There is a current limitation in regards to not mixing Windows and
Linux apps in the same resource group as well.
https://learn.microsoft.com/en-us/azure/app-service/containers/app-service-linux-intro#limitations
So you're only option at the moment is to create a new resource group for linux resources
[Update 2022-02-16]
It seems to be possible to now to share a resource group between Linux and Windows app service plans: https://learn.microsoft.com/en-us/azure/app-service/overview#limitations
[Original]
It is not possible to create a linux app service plan and a windows app service plan in the same resource group AND in the same location, but you can use the same resource group and deploy both plans in different locations.
Based on a current limitation, for the same resource group you cannot mix Windows and Linux apps in the same region.
https://learn.microsoft.com/en-us/azure/app-service/containers/app-service-linux-intro#limitations
Though I have discovered that the same error can also occur if you have created an app service certificate via the REST api or via terraform (which is also using the REST api) BEFORE creating the linux app service plan. You must create the linux app service plan before creating the certificate in the same location.
If you create app service plan for LINUX app in different region (though resource group can be in same region as that of Windows App service plan), it should still work.
In some cases, when trying to create a Function App, you may receive the following error...
you're creating the Function App in an existing resource group
this resource group already contains regular (i.e. non-Dynamic or Premium) Web Apps in the same region that you're trying to create the Function App. This can even occur if you are creating a Azure Functions Premium Plan in a resource group that has an App Service Premium Plan of the same OS.
the scale unit that those non-Dynamic or Premium resources are in does not yet support this SKU
you are attempting to create a Linux Consumption app in a resource group with any other app service plan type.
...
Even in some situations we have pools specifically for one plan. For example, Linux consumption stamps can only run linux consumption apps, so you aren't able to place a linux consumption plan in the same resource group as any other app service plan. The functions themselves can be in the same resource group, but the plan cannot be.
Ref
Creating Function Apps in an existing Resource Group
'LinuxDynamicWorkersNotAllowedInResourceGroup' error occurs when trying to have an app service and a linux function app in same resource group #1952

Azure App Service Plan cannot be changed

I have an App Service plan on which we have deployed some applications.
For the needs of reorganizing server and applications I wanted to rename the service plan which was in a standard resource group "Default-Web-WestEurope-blablabla".
Given that an App service plan cannot be renamed I have during the time created another resource group and gradually moved all my apps and services (Storage, Database ,etc.) inside the new resource group. Also the old App Service plan has been moved to the new resource group.
The scope was to have everything inside a new resource group and then create a new App Service plan where to move all the app services in the previous one by using the "Change App Service plan feature".
However I have discovered, after having created a new App service plan, that when I try to hit the "Change App Service plan feature" option, the answer is "No App Service plan found"!
How can I move all the resource between the two App Service plan?
EDIT:
I have tried by using Powershell and I get a a reason.
Set-AzureRmWebApp : Cannot change the site xxxxx to the App Service
Plan XXXXX due to hosting constraints. At line:1 char:1
In other words this operation can't be done if the original app service plan is in a different web space.
Yes, you are right. There is a limit when move an app to a different App Service plan. The resource group in the limit is the initial resource group when you create your App Service Plan.
Only valid plans (in the same resource group and geographical location) are shown.
For your issue, you could create a new App Service Plan in your original resource group. After finished the web app move operation, you could move all the resources to the new resource group.
If you moved your web app to the new resource group, Web App backup and restore is a good choice to copy all the contents and configurations from your old Web App to a new Web App.
In my case I just deleted the resources causing this issue and redeployed those resources.

Azure Resource Group split into different regions

Apologies I am quite new to Azure.
I have setup an Azure RG but for some reason the App Service and App Service Plan are located in South Central US. I think it may be slowing down the performance? How do I move everything to use UK South?
For some reason I was thinking about moving the resources to the other resource group, not the other region. So the answer is: No. You can't do that for WebApps yet. You would have to create a new WebApp and new App Service Plan and deploy your code there.
How can I modify the Location of my web site in Windows azure?
If you have source code, It is the simplest way to redeploy your application to another new web app. If you do not have source code, please try to use clone via the following steps:
1) create a new web service plan with region "UK Source", select pricing tier as P1 at least (Clone app is a feature that is only available to apps hosted on Premium App Service Plans. You can upgrade your App Service Plan to get access to this feature).
2) Clone Web App in Azure portal. Refer to more information at this article. Choose the same resource group, select app service plan we created at step 1.
3) delete unused App service plan
4) Change App service plan that we created at step 1.

Resources