Creating a resource group is the first step in setting up your cloud environment. A resource group is a logical container that holds related resources for an Azure solution.

Prerequisites

Before you start, make sure you have:

  • An Azure account
  • Azure CLI installed on your computer

Steps

  1. Log in to Azure CLI

    Open your command prompt or terminal and run the following command to log in to Azure CLI:

    az login
    

    Follow the prompts to log in to your Azure account.

  2. Create a Resource Group

    Once you're logged in, use the following command to create a new resource group:

    az group create --name <ResourceGroupName> --location <Location>
    

    Replace <ResourceGroupName> with a name for your resource group and <Location> with the region where you want to create the resource group.

    For example:

    az group create --name myResourceGroup --location EastAsia
    
  3. Verify the Resource Group

    After creating the resource group, you can verify it using the following command:

    az group show --name <ResourceGroupName>
    

    This command will display the details of the resource group you just created.

Next Steps

Once you have created a resource group, you can start adding resources to it. Check out our Add Resources to a Resource Group guide to learn more.

Azure Resource Group