Skip to content
This repository has been archived by the owner on Mar 31, 2020. It is now read-only.

Latest commit

 

History

History
47 lines (37 loc) · 1.24 KB

README.md

File metadata and controls

47 lines (37 loc) · 1.24 KB

Azure Resource Group tag module

Manages the Azure Resource Group tags.

WARNING: Each tag must be managed only once by using the resource-group or resource-group/tags module and can not be renamed! Otherwise, unpredictable problems may occur.

There is Terraform bug that prevents this module from deleting the tag.

Prerequisites

On Apple macOS, install Homebrew and packages:

brew install azure-cli
brew install jq
brew install terraform

On other platforms, install the appropriate packages.

Usage

Copy and paste into your Terraform configuration, insert the variables, and run terraform init:

variable "resource_group_name" {}
variable "location" {}
variable "tags" {}

module "rg" {
  source   = "github.com/sicz/terraform-azure/resource-group"
  name     = var.resource_group_name
  location = var.location
  tags     = var.tags
}

module "rg_tag" {
  source              = "github.com/sicz/terraform-azure/resource-group/tag"
  resource_group_name = module.rg.name
  name                = "TAG_NAME"
  value               = "TAG_VALUE"
}