Can't move Api App to existing Web App service plan

Alex M 1 Reputation point
2021-02-08T21:53:30.483+00:00

Hi everyone,

I have a Web App that belongs to a given resource group and a service plan.

When I went to create a new API App, it wouldn't offer me to choose this existing service plan, even though I used the same resource group. Furthermore, the new Service Plan it was going to create had a different region in it.

I created the API app and manually set it to use the same region and resource group, but when I click "Change App Service plan", it still won't let me choose my existing service plan.

I referred to https://learn.microsoft.com/en-us/azure/app-service/app-service-plan-manage#move-an-app-to-another-app-service-plan

I have contacted the support via chat, they confirmed the Plan is supposed to be selectable, and suggested I ask here. Please help. Thank you!

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,956 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Grmacjon-MSFT 16,191 Reputation points
    2021-02-09T05:28:03.8+00:00

    Hi @Alex M ,

    We apologize for the frustration this issue may have caused.

    You can move an app to another App Service Plan (ASP), as long as the source plan and the target plan are in the same resource group and geographical region.

    3 conditions to move your app:

    1. Same resource group
    2. Same geographical region (physical location)
    3. Same webspace (deployment unit)

    Based on this doc its important to note:

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

    A workaround is to use the App Cloning feature. This option enables you to deploy a number of apps across different regions quickly and easily. Please keep in mind that App cloning is supported for Standard, Premium, Premium V2, and Isolated app service plans. So you will need to scale up if you are not currently using a lower ASP

    To clone an existing app within the same region, you need to create a new resource group and a new app service plan in the same region, and then use the following PowerShell command to clone the app:

    $destapp = New-AzWebApp -ResourceGroupName NewAzureResourceGroup -Name dest-webapp -Location "South Central US" -AppServicePlan NewAppServicePlan -SourceWebApp $srcapp  
    

    To clone an existing app including all associated deployment slots, you need to use the IncludeSourceWebAppSlots parameter. Note that the IncludeSourceWebAppSlots parameter is only supported for cloning an entire app including all of its slots. The following PowerShell command demonstrates the use of that parameter with the New-AzWebApp command:

    $destapp = New-AzWebApp -ResourceGroupName DestinationAzureResourceGroup -Name dest-webapp -Location "North Central US" -AppServicePlan DestinationAppServicePlan -SourceWebApp $srcapp -IncludeSourceWebAppSlots  
    

    Hope that helps. Please let me know if you have further questions.
    Thanks,
    Grace


  2. Grmacjon-MSFT 16,191 Reputation points
    2021-02-09T20:42:03.053+00:00

    Hi @Alex M ,

    Thanks for the additional information. Yes, there is a limitation with having a Linux and windows app in same App Service Plan but you shouldn't have any issue in mixing Linux and windows apps in the same resource group if the resource group was created on or after Jan 21, 2021.
    65950-aps-limitations.png

    Thanks,
    Grace