label

cloudposse/label/terraform

Terraform Module HCL TERRAFORM

Terraform Module to define a consistent naming convention by (namespace, stage, name, [attributes])

Install
module "label" {
source = "cloudposse/label/terraform"
version = "0.8.0"
}
⭐ Source on GitHub 📦 Registry page
README

terraform-terraform-label ![Latest Release](https://github.com/cloudposse/terraform-terraform-label/releases/latest) ![Slack Community](https://slack.cloudposse.com) [![README Header][readme_header_img]][readme_header_link] [![Cloud Posse][logo]](https://cpco.io/homepage) Terraform module designed to generate consistent label names and tags for resources. Use terraform-terraform-label to implement a strict naming convention. terraform-terraform-label is a fork of terraform-null-label which uses only the core Terraform provider. A label follows the following convention: {namespace}-{stage}-{name}-{attributes}. The delimiter (e.g. -) is interchangeable. It's recommended to use one terraform-terraform-label module for every unique resource of a given resource type. For example, if you have 10

Inputs (8)
NameTypeDescriptionDefault
delimiterstringDelimiter to be used between `namespace`, `stage`, `name` and `attributes`"-"
attributeslist(string)Additional attributes (e.g. `1`)[]
tagsmap(string)Additional tags (e.g. `map('BusinessUnit','XYZ')`){}
enabledboolSet to false to prevent the module from creating any resourcestrue
convert_caseboolConvert fields to lower casetrue
namespacestringNamespace, which could be your organization name or abbreviation, e.g. 'eg' or '""
stagestringStage, e.g. 'prod', 'staging', 'dev'""
namestringSolution name, e.g. `app` or `jenkins`""
Outputs (7)
stage — Normalized stage
delimiter — Delimiter between `namespace`, `stage`, `name` and `attributes`
attributes — Normalized attributes
tags — Normalized Tag map
id — Disambiguated ID
name — Normalized name
namespace — Normalized namespace
Details
FrameworkTerraform Module
LanguageHCL
Version0.8.0
Cloud TERRAFORM
★ Stars119
Forks58
Total downloads1.5M
Inputs8
Outputs7
Examples1
LicenseApache-2.0
Namespacecloudposse
Updated