Azure Resource Groups

Resource groups are logical containers in Azure that hold related resources for an Azure solution. They simplify management, organization, and access control for your Azure infrastructure.

Diagram showing Azure Resource Groups and resources within them.

An overview of Azure Resource Groups and their contained resources.

What are Resource Groups?

A resource group is a collection of Azure resources that you want to manage as a single entity. Resources can include virtual machines, storage accounts, virtual networks, web apps, databases, and more. When you create a resource group, you specify the Azure region where the resource group metadata is stored.

Key Concepts

Creating a Resource Group

You can create resource groups using the Azure portal, Azure CLI, Azure PowerShell, or ARM templates.

Using Azure Portal:

  1. Navigate to the Azure portal.
  2. Click "Create a resource".
  3. Search for "Resource group" and select it.
  4. Click "Create".
  5. Fill in the subscription, resource group name, and region.
  6. Click "Review + create" and then "Create".

Using Azure CLI:


az group create --name MyResourceGroup --location eastus
            

Using Azure PowerShell:


New-AzResourceGroup -Name "MyResourceGroup" -Location "East US"
            

Managing Resource Groups

Once created, you can perform various management operations on resource groups:

Resource Group Lifecycle

Resources in a resource group are not necessarily deployed at the same time or updated together. However, they are often managed together because they share a common lifecycle. When you delete a resource group, all the resources within that group are also deleted.

Important: Deleting a resource group is irreversible. Ensure you have backed up any critical data before proceeding.
Best Practice: Organize your resources logically into resource groups based on application, environment, or team to improve manageability and control.
Caution: Moving resources between subscriptions requires careful consideration of dependencies and RBAC roles.