How can i move resources between resource groups in different subscriptions in Azure?

455 Views Asked by At

I am trying to move resources between subscriptions. I try to move and select "show hidden types" but I get the error with 2 resources The resources are

canadacentral-Canada Centralwebspace-221016172710 the type is microsoft.web/certificates The error i get when trying to move my resources is :

This resource is located in resource group 'CanadaCentralResourceGroup', but hosted in the resource group 'canadacentral'. This may be a result of prior move operations. Move it back to respective hosting resource group

If i look at the Resourcegroup canadacentral there are no resources Why isnt it allowing me to move the resources ?

1

There are 1 best solutions below

0
RithwikBojja On

You can move resources using PowerShell Command as below and I followed Microsoft-Document:

 webapp=$(az resource show -g OldRG -n ExampleSite --resource-type "Microsoft.Web/sites" --query id --output tsv)
    plan=$(az resource show -g OldRG -n ExamplePlan --resource-type "Microsoft.Web/serverfarms" --query id --output tsv)
    az resource move --destination-group newgroup --ids $webapp $plan

Note: You cannot move a certificate on its own even if it is not binded and also if it is resource free App Service managed certificate.

To move to different resource group:

Firstly, click on a particular resource then you will be having move option on resource group as below:

enter image description here

References taken from: