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
- Created a webapp in resource group test1 under sub1
- Moved the webapp to another resource group called test1_old and deleted the resource group test1
- 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: - Re-created the resource group test1 under sub1
- Moved the webapp from test1_old to test1 in the same subscription
- 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:
- 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.
- Move the resources into the re-created resource group.
- Try move operation again to the new subscription.