11. A Closer Look at Resource Groups, Locks and Deployments and Tags

Azure Resource Groups: A Comprehensive Guide

Welcome to the lesson on Azure Resource Groups. This is an essential aspect of managing and organizing your Azure resources efficiently.

Key Points

What is a Resource Group?

An Azure Resource Group is like a folder that can contain one or more Azure resources like an Azure SQL database, a Kubernetes cluster, and more. It acts as a boundary similar to a management group or Azure subscription, allowing you to organize and control access to resources efficiently.

  • Organizational Boundary: Helps in organizing resources.
  • Access Control: Controls who has access to resources.
  • Deployment Containment: Holds deployment records, making it easy to repeat and investigate deployments.

Geographical Location

A Resource Group has a geographical location (e.g., West US). This location is used to store metadata and deployment information. However, the resources within the group can be located anywhere.

Tags

Resource Groups can also have tags, which are key-value pairs used for various purposes like cost management (e.g., Tag: Environment, Value: Dev).

  • Cost Management: Helps organize resources for better cost tracking.
  • Organization: Facilitates easier reporting and management.

Cost

Resource Groups are free; you don't pay for them.

Practical Walkthrough

Creating a Resource Group

  1. Navigate to Resource Groups: Select the 'Resource Groups' option in your Azure dashboard.
  2. Create New Resource Group:

    • Name: Give your resource group a name.
    • Region Location: Select a geographical location (e.g., East US).
    • Tags: Add tags like Environment: Production.
  3. Finalize and Create: Confirm details and create the resource group.

Adding a Service to the Resource Group

  1. Search for Service: Look for the desired Azure service (e.g., Storage Account).
  2. Select Resource Group: Choose the newly created resource group.
  3. Provide Service Name: Enter a name for the service.
  4. Specify Location: Choose a location different from the resource group if needed.
  5. Create Service: Finalize and create the service.

Exploring Deployments and Redeployments

  • List Deployments: Resource groups contain records of all deployments.
  • Inspect Deployments: View details about each deployment.
  • Redeployments: Repeat the deployment with the same or modified parameters.
  • ARM Template: The deployment is defined in an Azure Resource Manager (ARM) template in JSON format.

Locks

Resource groups and individual resources can have locks placed on them to prevent accidental changes or deletions.

  • Read-Only Locks: Makes the resource read-only.
  • Delete Locks: Prevents the resource from being deleted.

Summary

Azure Resource Groups are crucial for efficient resource management, offering features like organizational boundaries, access control, deployment records, and tagging. They are free and can significantly ease the administration of Azure resources.