Skip to content

Deploy Resource Group

Example only

Review and validate before production use. All values below are placeholders.

Summary

This note shows a minimal Terraform deployment for an Azure resource group.

Placeholder values

  • Subscription: SUBSCRIPTION_ID_PLACEHOLDER
  • Tenant: TENANT_ID_PLACEHOLDER
  • Resource group: rg-cloudnotes-dev-we
  • Location: westeurope

Terraform example

terraform {
  required_version = ">= 1.7.0"

  required_providers {
    azurerm = {
      source  = "hashicorp/azurerm"
      version = "~> 4.0"
    }
  }
}

provider "azurerm" {
  features {}
  subscription_id = "SUBSCRIPTION_ID_PLACEHOLDER"
  tenant_id       = "TENANT_ID_PLACEHOLDER"
}

resource "azurerm_resource_group" "example" {
  name     = "rg-cloudnotes-dev-we"
  location = "westeurope"

  tags = {
    environment = "dev"
    owner       = "cloudnotes"
  }
}

Verification

terraform init
terraform plan
terraform apply

Confirm the resource group exists in the target subscription.