24

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!

Kevin
  • 1,516
  • 1
  • 16
  • 31

5 Answers5

38

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.

Gaurav Mantri
  • 128,066
  • 12
  • 206
  • 241
  • 1
    As a note I was creating a container via the Azure CLI following [this](https://learn.microsoft.com/en-us/azure/container-instances/container-instances-tutorial-deploy-app) tutorial and the location of the resource group DOES matter here. After switching to a resource goup that was WestUS (instead of WestCentralUS) we were able to deploy a container. Hope this helps someone! – Jeff L Apr 03 '18 at 16:17
  • 23
    "It does not matter" means that it does not matter if you ignore the confusion it causes every time. – Caspar Kleijne May 09 '18 at 07:40
  • 3
    Also note that resource group metadata is written to the resource group's location, which can, in fact, matter to international law, depending on a few factors. – Wesley Nov 14 '18 at 20:53
  • 1
    "It wouldn't matter where your resource group is created. It is just a logical container of resources inside it. " It is an overstatement. [Accessing metadata may be crucial when building reliable applications](https://stackoverflow.com/questions/30873267/azure-what-is-the-purpose-of-a-resource-group-location/58578619#58578619) – Lukasz Szozda Oct 27 '19 at 10:51
  • It doesn't matter it's only that by Default Microsoft have WestUS region having most of the defaults set and supporting more services setup e.g. LUIS – STREET MONEY Jul 21 '20 at 13:00
5

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.

Steven
  • 804
  • 4
  • 12
  • Exactly. Create a new Western Europe resource group, then move resources into your new resource group. Then delete your old resource group that you are no longer using. – Rob Reagan Feb 13 '17 at 16:07
  • The only way I was able to move the App Service to the desired location was to create a new App Service Plan in that location, add a new App Service to that App Service Plan and deploy my app to the App Service. – Aaron Newton Oct 06 '17 at 00:51
1

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.

sports
  • 7,851
  • 14
  • 72
  • 129
0

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.

Bhargav Rao
  • 50,140
  • 28
  • 121
  • 140
Rishabh Soni
  • 159
  • 1
  • 10
0

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:

  1. Create a new temporary resource group, location doesn't matter for this one, for these steps we are calling this resourceGroup-temp
  2. 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.
  3. Once empty, delete the old resourceGroup
  4. Create new resourceGroup resourceGroup but with the correct location this time.
  5. Move resources from resourceGroup-temp to resourceGroup
  6. Delete temporary resourceGroup-temp

Voilà you have your resources in a resource group with the same name and now the correct location. Good luck.