Lesson 1 of 4 · Azure with Terraform

Resource groups and providers

Azure resource groups organise related resources by lifecycle, ownership, and environment. Terraform’s azurerm provider manages Azure resources using the same configuration language and workflow you use for other providers.

Example

provider "azurerm" {
  features {}
}

resource "azurerm_resource_group" "main" {
  name     = "rg-training"
  location = "Southeast Asia"
}

Step by step

  1. Configure the Azure provider.
  2. Create a resource group for one clear purpose.
  3. Use a consistent location.
  4. Name resources so ownership is visible.

Common mistakes to avoid

  • Mixing unrelated production and training resources in one group.
  • Using different locations without a reason.