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

Latest commit

 

History

History
43 lines (33 loc) · 1.01 KB

README.md

File metadata and controls

43 lines (33 loc) · 1.01 KB

Azure resource name module

Manages an Azure resource name.

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 "project" {}
variable "location" {}

module "rg_name" {
  source     = "github.com/sicz/terraform-azure/resource-name"
  name       = var.project
  location   = var.location
  separator  = "-"
  max_length = 80

  # Insert optional input variables here
}

module "rg" {
  source   = "github.com/sicz/terraform-azure/resource-group"
  name     = module.rg_name.result
  location = var.location

  # Insert optional input variables here
}