liveBook · Manning

Azure resource group

As explained in Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform

An Azure resource group is a management container that organizes related cloud resources.

An Azure resource group collects related cloud resources so they are easier to organize and manage. Create or select one when provisioning a private container registry or a managed Kubernetes cluster. A resource group for an application can also be the first piece of infrastructure created with Terraform, before the other Azure resources it will contain. section 3.9.1 section 6.9 section 7.8

Choose how to create it:

  • In the Azure portal, select an existing resource group or click Create New, enter a meaningful name, and click OK. The name need not match the container registry’s name or be globally unique. section 3.9.1
  • With Terraform, declare an `azurerm_resource_group` resource in `resource-group.tf`, setting its `name` and `location`. The resource type is supplied by the Azure provider. section 7.8 section 7.8.2
Listing 7.1 Creating an Azure resource group
resource "azurerm_resource_group" "flixtube" {   #1
  name = "flixtube"                              #2
  location = "eastus"                            #3
}

This minimal Terraform declaration creates a resource group named `flixtube` in `eastus`. section 7.8.2

Run `terraform apply`, inspect the proposed changes, and enter `yes` to approve them. On the first run, Terraform reports one resource added. To check the result directly, open Resource Groups in the Azure portal and find the new group. Terraform can subsequently destroy and recreate the infrastructure with `terraform destroy` and `terraform apply`. section 7.8.6 section 7.8.9

How Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform covers it

How deep it goes
Works through portal creation, a three-line Terraform declaration, plan approval, and verification; does not elaborate on resource-group internals.
Examples
Uses a private container registry, a managed Kubernetes cluster, and a `flixtube` resource group declared in `resource-group.tf`.
What it assumes
Assumes access to an Azure account and teaches the initial Terraform resource declaration and apply workflow.
What you can do after
Build it from scratch in the Azure portal or with Terraform, then verify its creation in the portal.
How it connects
Connects resource groups to Azure Container Registry, managed Kubernetes, Terraform, and infrastructure as code.

Also explained in

Compare how 4 books explain Azure resource group →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform. The section links point to the parts of the book it draws on.