Skip to content

Azure-Terraform/terraform-azurerm-metadata

Repository files navigation

Azure - Metadata Module

Introduction

This module will return a map of mandatory tag for resources in Azure.

It is recommended that you always use this module to generate tags as it will prevent code duplication. We also reccommend leveraging this data as "metadata" to determine core details about resources in other modules.

  • For example the location output can be referenced when creating a virtual machine. If you want to change regions at a later date you only need to update one place.

Where applicable, the inputs will be checked against the input naming rules for Azure.

Providers

Name Version
azurerm >= 2.0.0

Inputs

Name Description Type Default Required
additional_tags A map of additional tags to add to the tags output map(string) {} no
business_unit rba.businessUnit (https://github.com/Azure-Terraform/example-naming-template#custombusinessunit) string n/a yes
environment rba.environment (https://github.com/Azure-Terraform/example-naming-template#customenvironment) string n/a yes
location rba.azureRegion (https://github.com/Azure-Terraform/example-naming-template#customazureregion) string n/a yes
market rba.market (https://github.com/Azure-Terraform/example-naming-template#custommarket) string n/a yes
naming_rules naming conventions yaml file string n/a yes
on_prem rba.onPrem (https://github.com/Azure-Terraform/example-naming-template#customonprem) string "" no
product_group rba.productGroup (https://github.com/Azure-Terraform/example-naming-template#customproductgroup) or [a-z0-9]{2,12} string "" no
product_name rba.productName (https://github.com/Azure-Terraform/example-naming-template#customproductname) string "" no
project Jira Project string n/a yes
resource_group_type rba.resourceGroupType (https://github.com/Azure-Terraform/example-naming-template#customresourcegrouptype) string n/a yes
service_name rba.serviceName (https://github.com/Azure-Terraform/example-naming-template#customservicename) string "" no
sre_team SRE Team owner string "" no
subnet_type rba.subnetType (https://github.com/Azure-Terraform/example-naming-template#customsubnettype) string "" no
subscription_id Azure Subscription ID string n/a yes
subscription_type rba.subscriptionType (https://github.com/Azure-Terraform/example-naming-template#customsubscriptiontype) string n/a yes
virtual_network_gateway_type virtualNetGwType (https://github.com/Azure-Terraform/example-naming-template#customvirtualnetgwtype) string "" no

Outputs

Name Description
location Azure region
location_pair Azure paired region
names Map of validated names for resources
tags Map of tags with any global defaults appended