Adding same resource in multiple resource groups - azure

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.

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.

Moving azure resources from one resource group to another

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)

Azure: Same resource group for many VMs in DevTest labs

Is it possible to create many VMs in a DevTest lab in the same Resource group? How can I do this?
A new resource group is created for each new VM ( with a random name) in the lab
Currently, there is no way to gather all DevTest Lab VMs into a single Resource Group.
This is the feedback, Azure DevTest Labs Team has replied the issue, you could refer to it.
We’ve planned the work to create minimum number of resource groups for lab VMs (starting from a single resource group for multiple lab VMs, and expand to another resource group if the resource quota is hit). Does it solve your problem? Providing naming convention for the lab-generated resource group and other resources is also planned.

Choosing an existing resource group gives error

When I try to deploy my solution on MS azure using an existing resource group it gives me an error as follows:
"This resource group contains existing resources.Choose an empty resource group or create a new one".
Can someone point how can I fix the error in CreateUIdefination.json or something else I need to do.
According to the message, we can't create that resource to that resource group which contains existing resources, we should create a new resource group, or use an empty resource group.
As 4c74356b41 said, by default, Azure not support to deploy managed application to resource group with resources.
Please try to use an empty resource group to deploy it.

Unable to associate existing virtual network moved from a resource group to another in which creating new virtual machine through azure portal

I'm unable to associate the existing virtual network after moved from one resource group to the required resource group in which I am trying to create new virtual machine in the required resource group through ARM azure portal.
According to the error log, please ensure your VNet is in the Southeast Asia and in the same subscription.
Note: When you move VNet from one resource group to another resource group with new different location, the location of VNet does not change.

Resources