Resource Groups are containers for Azure resources. There are different practices and recommendations regarding how to use resource groups to organize your infrastructure. Some common ways are to group resources by:
- Lifecycle: putting one resources that share the same lifecycle in one group. E.g. you put Database and KeyVault in one RG and compute resources in another, meaning, you might create and recreate your compute resources but probably you will not recreate your database and key vaults as they hold persistent data.
- Solution: grouping all the resources of one solution into one resource group.
- Permission: If you are using RGs to define access control to resources, you might choose to group all the resources that share the same permission levels into one RG. This way, you can define access control on the RG level.
As per my experience, I have come to see that grouping resources by lifecycle is the cleanest and most pragmatic way of organizing resources in RGs.
TIP: Althought you can have an RG belonging to one location and containing resources in another, it is a recommendation that you use same location for the resource group and its resources.