Changing Azure Resource Group location - azure

I have a setup in azure with a bunch of resources combined in a resource group. I want my services to be located in west-europe, so all my resources are there (where possible)
I just noticed that when creating the resource group, i accidentally used West US.
So the current setup is:
Resource Group 1 (West US)
App Service 1 (West Europe)
App Service 2 (West Europe)
SQL Server (West Europe)
Storage account (West Europe)
... (West Europe)
Can I change the location of the resource group without having to create a new one and migrate everyting?
And maybe more importantly: Should i change the location or does it not impact anything?
Thanks!

You can't change the location of a resource group.
It wouldn't matter where your resource group is created. It is just a logical container of resources inside it.
Your resources inside a resource group need not be in the same region as that of the resource group. They can be in any region where the resource is supported.

You cannot change the location of the resource group, also moving a resource only moves it to a new resource group. The new resource group may have a different location, but that does not change the location of the resource. You could refer to Move resources to new resource group or subscription for details.

Regarding your last question:
Should i change the location or does it not impact anything?
It does impact somehow, but its little:
The resourcegroup holds metadata of the resources within. That metadata is located in the location of the resourcegroup. So the impact is witnessed when you use the Azure Portal and the information is presented to you.
For example:
The other day Brazil South was having troubles, and the portal was taking forever on presenting me the information, because I have resource groups located in Brazil South.

This is not possible. But you already know that by now. Alternative is that you can shift services/resources from one resource group to other, where both resides in different geo location.

Resource group's location can't be changed per se. But by moving resources around I was able to achieve changing the resource group location.
The situation I was in is that I had my resourceGroup set to WestUS location and all the resources within the group set to WestUS2. This was causing issues with my ARM templates. So these are the steps of how I solved this:
Create a new temporary resource group, location doesn't matter for this one, for these steps we are calling this resourceGroup-temp
Move resources to the new resourceGroup-temp. This will depend on your particular situation, I only moved my Cosmos DB and storage account because I knew my FunctionApp and App plans can be recreated from my pipeline upon deployment.
Once empty, delete the old resourceGroup
Create new resourceGroup resourceGroup but with the correct location this time.
Move resources from resourceGroup-temp to resourceGroup
Delete temporary resourceGroup-temp
VoilĂ  you have your resources in a resource group with the same name and now the correct location. Good luck.

Related

Azure VMs in different locations

Is it possible to create VMs in a different location but in the same resource group?
Eg One VM will in West Europe and the other in East US
Of course, yes.
A resource group is a container that holds related resources for an Azure solution. The resource group can include all the resources for the solution, or only those resources that you want to manage as a group. You decide how you want to allocate resources to resource groups based on what makes the most sense for your organization. Generally, add resources that share the same lifecycle to the same resource group so you can easily deploy, update, and delete them as a group.
The resource group stores metadata about the resources. Therefore, when you specify a location for the resource group, you are specifying where that metadata is stored. For compliance reasons, you may need to ensure that your data is stored in a particular region.
The resources in a resource group can be located in different regions than the resource group. And you can even move a resource from one resource group to another.
The other factors that can help in defining your resource group are explained here in detail.

Move Azure SQL Managed Instance across subscription

I have two SQL managed instance in two different region(One in Australia East another one in Australia Southeast. They are in a Pay-As-You-Go subscription. Now I want to move those resources to a CSP subscription. Is it possible to move SQL managed instance across subscription?
Azure SQL managed instance supports the move operation: move to another resource group or another subscription. You can get this from this document: Move operation support for resources.
If you want to move the managed instance subscription, you need to operate on the resource group overview. Choose all the resource about managed instance.
For more details, please see this Azure tutorial: Move resources to new resource group or subscription:
Summary:
This article shows you how to move Azure resources to either another Azure subscription or another resource group under the same subscription. You can use the Azure portal, Azure PowerShell, Azure CLI, or the REST API to move resources.
Both the source group and the target group are locked during the move operation. Write and delete operations are blocked on the resource groups until the move completes. This lock means you can't add, update, or delete resources in the resource groups, but it doesn't mean the resources are frozen. For example, if you move a SQL Server and its database to a new resource group, an application that uses the database experiences no downtime. It can still read and write to the database.
Moving a resource only moves it to a new resource group. The move operation can't change the location of the resource. The new resource group may have a different location, but that doesn't change the location of the resource.
It also gives you many examples about how to move resource group or subscription:
By using Azure portal.
By using Azure PowerShell.
By using Azure CLI.
By using REST API.
Hope this helps.

Azure Resource Groups - Moving to a new Resource Group. Is there any downtime?

I have a bunch of resources located in East US, however the Resource Group was created using West US location. Although the Resource Groups are just a way to logically group resources, I would like to match the location of the Resource Group with the actual resources.
If I create a new Resource Group on the East US location and then move all the resources from the old Resource Group to the new one, is there going to be any downtime during this operation or will the resources continue operating as expected?
Unfortunately, it seems that the resources would be shut down during your migration between regions. But they will work as perfect as before when you finish the migration.
If you do not change the regions of the resources. There can be no downtime during the migration. Take a look at this.

Add resources to existing azure resource group

Today I tried to add new VM into an Azure Resource Group that already has VMs and other resources and it was successful. I removed it and after a while, when a new VM was being added into the same Resource Group, it prompts a new Resource Group would be needed to store the new VM.
I was wondering when a new VM could and could not be added into a Resource Group taken by other resources.
Thanks.
No, this is not the case, you can put almost any resources together in a resource group. there are some weird exception like: windows and linux app service plans cant exist in the same resource group.
you can add resources to different regions in the same resource group as well
you cannot add resources with the same name and type to the resource group, because name + type combination has to be the same
so you can add VM called new and VM called new1, but not VM called new and another VM called new; but you can add VM called new and Azure SQL called new into the same resource group (give that Azure SQL instance called new is available, but this has nothing to do with the resource group)
This can now be done from the portal. In your portal at the Home page click Virtual Machines, then Add. You can then choose the current resource group and add the machine in to it. May be of use to someone else coming along later like I did.

Can we recover the azure resource group in azure cloud?

Some times we had deleted the 'resource group' accidentally on azure cloud, its fine that if our/your resource group does not have any deployments on it and we can create immediately newer one and will proceed our stuff, but if we had deployments on it, then its becomes major problem/task.
So can we recover Resource Group? like a recovery of Virtual machine in Azure.
You can export service configurations that belong to a resource group as JSON. Within the portal, there is an option "Export Template" under the Resource Management Navigation Group.
So can we recover Resource Group? like a recovery of Virtual machine in Azure.
Unfortunately, we have no way to recovery it, if the resource group is deleted . We could get the warning if we try to delete resource group from the azure portal. Connect to Azure support team for help maybe a way, but I don't think it could be easy for restoring.
Note : based on my understanding even if we could re-create the resource with ARM template(If we have exported the ARM template before delete), it seems that just with the same resource names with deleted resource that is not equal recovery action.

Resources