This is 2024 update.
You said that
Both App Services are in the same Location and Resource Group
so normally when you will click on Change App Service Plan within the web app
in azure portal, the other app service plans list which reside in the same region and Resource Group must show up.
There is a possible explanation for this, that the app service plans
that you created, were in other resource groups, then you moved them within the same RG and Region, that's why they didn't appear for you, just those app service plans which were created within the same RG and Region are the ones that you can move web app between them.
as stated in the Microsoft Documentation:
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, geographical region, and of the same OS type.
BUT NOTE THAT:
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 can have multiple webspaces, but your app can only move between plans that are created in the same webspace.
so there is something which is called webspaces
, let's say we have :
App Service Plan called A
and another one called B
:
A Plan: within `Main RG` and in `North Europe` with 1 web app hosted
B Plan: within `Sub RG` and in `North Europe` with 1 web app hosted
Let's say both of them have one web app, later I decided to move my app service plan B
to the same region and RG of A Plan
.
everything is fine now, days has passed, and I decided to move an app from B Plan
to A Plan
and delete B Plan
, normally it would work because I moved the plans in the same Place, but unfortunately both of them when they have been created, they have been assigned to different webspaces
, so you can't move apps between them.
You can check webspace
of your web app
under Overview -> JSON View
you will see something like:
"properties": {
"name": "webapp-Production-name",
"state": "Running",
"hostNames": [
"webapp-production.azurewebsites.net"
],
"webSpace": "WebAppProductionRG-NorthEuropewebspace",
#Solution
- Either you will have to Create a new
app service plan
and recreate
your desired web apps within it, then redeploy to them.
- or you can try the clone option within azure portal, you can do it
too using
AZ cli
, It can be found under web app ->
Development Tools -> Clone App
'(Unfortunately the clone option is available only in windows web apps, and not available for Function Apps :/)':