Reputation: 6893
I am trying to move a single Resourcegroup from one subscription to another one. Here how the things looked like
ResourceGroupA (I want to move between subscriptions)
-WebApp A
-SqlDB
-Plan
ResourceGroupB
-WebApp B
So WebApp B is accessing also SQlDB. When I try to move ResourceGroupA to the other Subscription, Azure returns warning that I must Move WebApp B together. It makes sense because it depends on SQLDB. Ok I moved WebApp B to the ResourceGroupA. Starting Move operation again, bump, another error. It complains
WebApp B This resource is located in resource group 'ResourceGroupA ', but hosted in the resource group 'ResourceGroupB'. This may be a result of prior move operations. Move it back to respective hosting resource group
So what will be the solution now? Is there a better way to move maybe 2 ResourceGroups at the same time?
Upvotes: 1
Views: 834
Reputation: 6893
After 2 days i could solve the problem and i hope that it will help anyone else struggling with this problem.
Although i have described above a simple scenario, i tried to move like 20 resource together within a resource group and Azure complains every time a different resource. Like above described, it complained first a web app which is in another resource group and it suggested me that i should move it together with ResourceGroupA and move it from ResourceGroupB to ResourceGroupA. Here very important you stop the website first and move it because otherwise hosting will remain in ResourceGroupB and it will complain again as error message above. Even though you do that correctly, it complains that you should move the Plan as well if it is in other resource group. When you move it, it complains again that Plan hosting remained in the other resource group. It asks you to move back to the original ResourceGroup which makes no sense and it goes like a ping-pong game. If you make a few move operations suddenly it gets locked and gives your warning that "ResourceGroup has incomplete operation please wait". this might take entire day til you can do another attempt.
Final clear solution, if you are able to do, just publish your web app to the other subscription with a new plan and delete the old one. I have had like 3 web apps complained like that deleted all 3 and republished to the target subscription and i was able to move the rest of the resource group without any error or warning. Beside this solution it is pointless to try back and forth.
Upvotes: 0