Azure WebApp, Microsoft Azure

Cannot move resources Code: ResourceMoveProviderValidationFailed

I have come across an issue reported by a customer. While trying to move the Azure Webapp to a different subscription, the move operation failed with the following error message

testwebappmanu (Microsoft.Web/sites). This resource is located in resource group 'test1', but hosted in the resource group 'test1_old'. This may be a result of prior move operations. Move it back to respective hosting resource group

I have re-produced the same issue you in my azure infrastructure. Good news is I have found a workaround also to solve the issue. Here is how I have tried

  1. Created a webapp in resource group test1 under sub1
  2. Moved the webapp to another resource group called test1_old and deleted the resource group test1
  3. Tried moving the webapp to test1_new in sub2. The move operation has failed with the following error testwebappmanu (Microsoft.Web/sites). This resource is located in resource group 'test1', but hosted in the resource group 'test1_old'. This may be a result of prior move operations. Move it back to respective hosting resource group 

    Here are the steps I did to fix the issue:
  4. Re-created the resource group test1 under sub1
  5. Moved the webapp from test1_old to test1 in the same subscription
  6. Now, tried moving the webapp from test1_old in sub1 to test1_new in sub2 and it went success

So, the workaround for the issue is in general as follows:

  1. Re-create a new resource group in the same subscription where the App Service Plan/App Service exists, with the same name listed in the error message.
  2. Move the resources into the re-created resource group.
  3. Try move operation again to the new subscription.

Leave a Reply

Your email address will not be published. Required fields are marked *