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.
Related
In our organization, we have a common Azure subscription with a separate resource group for each solution. I have Owner rights for my solution's resource group, but when we create Databricks workspaces, a separate managed resource group databricks-rg-*** is created which I don't have access to. To be able to manage our Azure costs, I need to have access to the Cost analysis section of this managed resource group. What role do I need in this resource group to be able to see the costs?
To be able to manage our Azure costs, I need to have access to the Cost analysis section of this managed resource group. What role do I need in this resource group to be able to see the costs?
To see the cost, the Reader role is enough. If you want to do other operations except reading, you need the role e.g. Contributor, Owner.
I am a novice in Azure and currently learning about resource groups. According to their documentation, it says "a resource can only be a member of a single resource group", but I just created 2 different resource groups and named them 'msftlearn-core-infrastructure-rg' and 'msftlearn-core-infrastructure-rg2' under Free Subscription and I added Virtual Network as a resource in both of them.
I have named the network separately as well. The tutorial says to add vitual network resource in just 'msftlearn-core-infrastructure-rg', I created another resource group just to see what error I get if I add same resource in another resource group.
The virtual network resource was added successfully in both the resource groups. So doesn't it contradict the statement: "a resource can only be a member of a single resource group"?
A bit confused here. Please help.
What you did is create 2 virtual networks, both of which are in a single resource group.
A single virtual network can only be in a single resource group.
You can create more of similar resources in different resource groups.
I have two resource groups in our azure account, one(A) is having all the database(SQL) resources and other one(B) having other resources like app service, key vault, service bus etc.
Now we have decided to make a single resource group and we are trying to move SQL resources from resource group A resource group B. but it gives duplicate resources error as saying the resources we are trying to move is already there. But I have checked properly and those resources are not in resource group B.I have checked hidden types as well.
(A)
(B)
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.
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.