32

I'm new to Azure architecture and am trying to understand why Azure Resource Groups, which are logical deployment buckets for applications built on Azure, are associated with a region when they are defined.

At first I thought it was to provide global distribution for disaster recovery or geographic redundancy, but then I realized that a single Resource Group can contain web apps in different regions, which can provide those features via Traffic Manager. I suppose that using separate Resource Groups would help better identify which resources are in which region, but other than for organizational purposes, I can't understand what the region definition for Resource Groups implies.

(edit: removed general advice query to be more focused)

Josh
  • 3,035
  • 2
  • 23
  • 40

6 Answers6

33

The main reason for specifying the location of a resource group is to specify a location for data/metadata for the deployment to be stored in... It also makes the API consistent (think of the paths in REST API calls) but the primary reason is storage during deployment.

The location of the resources in the group is independent/not related to the location of the group itself.

bmoore-msft
  • 6,629
  • 16
  • 20
  • 1
    Can you expand a little further on 'storage during deployment'? That sounds like moving bits around which would seem to be something worth considering when building out new infrastructure. – Josh Sep 10 '15 at 16:53
  • It's more along the lines of "metadata" for the deployment. For example, the json file itself is stored during deployment. If you had something like a custom vm image that's part of the deployment for a VM, that is *not* stored with the RG. – bmoore-msft Sep 10 '15 at 22:12
  • Ah, so resource groups are intrinsically tied to a deployment template. – lordcheeto Oct 24 '15 at 20:25
  • Technically a RG has "deployments" - those could be templates (one or more different ones) or you could create the resources manually (PowerShell, REST). In the end it's just the metadata and an arbitrary grouping of resources that you want to manage as a group. – bmoore-msft Oct 26 '15 at 15:41
  • It's also the location by default for the resources inside the resources group. – Frank Boucher Dec 15 '16 at 12:18
  • 1
    What if you have an ARM template with a RG in region A, containing resources in region B, and region A is unavailable for some reason. If you deploy the template, will it fail? – João Pedro 'jota' Martins Feb 28 '17 at 17:56
  • If you're trying to do a deployment with resources in A that reference resources in B and A is unavailable, then yes the deployment would fail. If region be is unavailable, depending on the relationship between resources it won't it may not fail until run-time. All in theory, if a datacenter (i.e. a region) goes off-line, there are likely bigger problems on the internet than a region going offline... – bmoore-msft Mar 01 '17 at 00:02
  • If I have a resource group and resources in one region, would it make sense to create a recovery services vault, for sql server for example, and create it in that resource group but in a different region so I would have a geo redundant backup of my long term db backups? – Dan Csharpster Feb 13 '18 at 04:00
  • Any time you want to ensure geo-redundancy, it's a good idea to build that into the deployment. SLA changes in many cases if you don't. So yes, use recovery, zones, GRS, etc as needed. – bmoore-msft Feb 15 '18 at 00:30
3

When creating a resource group, you need to provide a location for that resource group. You may be wondering, "Why does a resource group need a location? And, if the resources can have different locations than the resource group, why does the resource group location matter at all?" 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.

https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-overview

Leo Bastin
  • 63
  • 1
  • 5
1

The meta data (definition) of the Azure resource group needs to be stored somewhere. hence the location. However, resources inside a resource group are location independent and can be placed in a different region\location. Do note that dependencies between resources can exist. A Virtual machine in West Europe obviously needs a storage account in West Europe as well, but a SQL database in the same resource group can exist in West US.

  • So then is is safe to say that there really *is* no significance associated to the Resource Group region, then? That is - there would be nothing lost if MS decided to specify the region on the back end when you created a new one, leaving it hidden from end users? – Josh Sep 05 '15 at 18:58
  • correct (if I understood it like: there is no difference if the resource group is created in West US or North EU or any region). What do you mean by 'leaving it hidden from end users? btw, why would MS change the location of any of your resource groups? One can assume MS has no access to the data in your subscription – Stijn Callebaut Sep 05 '15 at 19:28
  • 1
    I also have the same question. BTW, leaving it hidden from end users - the screen can just ask for Resource Group Name and the Subscription (since there is no meaning in providing the location and Azure can do for us under the hood) Any thought? – Rajan Panneer Selvam Aug 02 '16 at 17:10
0

Resource groups are basically for you to decide which resources in your application you want to manage together and by manage I mean you want to deploy, manage, and monitor them as a group so at a high level you do not see them as separate components.

In general in a big ecosystem, Azure resource groups are the ones that you do not see those components(resources) in them as separate entities, instead you see them as related and interdependent parts of a single entity so you put them in one Resource Group so that using the Azure Resource Group Manager tool You can deploy, update or delete all of the resources for your application in a single, coordinated operation.

You use a template for deployment and that template can work for different environments such as testing, staging and production. You can clarify billing for your organization by viewing the rolled-up costs for the entire group.

You can find more details on Azure Resource Manager here which I believe will help you better understand the idea behind the Azure Resource Groups:

https://azure.microsoft.com/en-us/documentation/articles/resource-group-overview/

Josh
  • 3,035
  • 2
  • 23
  • 40
Aram
  • 5,021
  • 2
  • 28
  • 39
  • 6
    Right, that's a good summary of what they are used for. My original question was why you have to assign them to a specific region when creating them. The three pieces of info it asks for are Name, Subscription, and Region. – Josh Sep 05 '15 at 00:38
  • Location in resource means which Azure data center you want to use for a resource. I guess you'd want all resources in a resource group to be in one data center location... – Aram Sep 05 '15 at 01:08
  • I've down-voted because I've had this same question/thought and this answer provides a summary of resource groups without answering the question, on 2 occasions. I do appreciate this is 5 years old. – ColinM Feb 13 '20 at 21:53
-1

Everything in Azure relates to a physical location/Datacenter, and ARM is no different. A little while ago, not every Datacenter supported ARM, so the reason for choosing made even more sense. Now, like any other Azure resource, the decision is for the user to make, often based on their required proximity to the end user and/or legal geographic requirements.

AndyHerb
  • 610
  • 9
  • 24
  • Right, but for Resource Groups specifically, what would drive that decision other than to 'make it match' the primary resources for that particular deployment? It appears to just be metadata that has no direct impact on the allocation of the resources contained inside. – Josh Sep 05 '15 at 18:55
  • I suspect the idea was to provide functionality similar to Affinity Groups (and older IaaS v1 feature) which geographically (and physically) tried to group items together for improved performance. Resource Groups aren't bound geographically like this, but they do allow you to create a bunch of resources without needing to specify each region; effectively giving a default location unless an alternative is provided. – AndyHerb Sep 05 '15 at 20:19
  • Something else to ponder is that this was the most logical way to drop in something that was an after thought. – Mikee Sep 10 '15 at 16:46
-1

It appears there is no obvious way to determine what region a resource group is in after it has been created. This has caused me grief per the discussion here, when I ran into problems with CDN metadata conflicts. I had to start over. Now I name my resource groups with the region. e.g.: my-resourcegroup-westus

Rob Campbell
  • 442
  • 4
  • 8
  • 1
    All the Azure APIs offer this information. For example, try the Azure CLI: `az group list` – Josh Jul 28 '19 at 19:32
  • 1
    The Azure portal now displays this information. Navigate to 'Resource groups'. Click 'Edit columns' and you have the option of displaying 'Location' (e.g. 'South Central US') and 'Location ID' (e.g. 'southcentralus'). – Brett Rowberry Sep 04 '19 at 19:14