label

devops-workflow/label/local

Terraform Module HCL LOCAL

Terraform module to create consistent naming

Install
module "label" {
source = "devops-workflow/label/local"
version = "0.2.1"
}
plain text: /constructs/tfmod-devops-workflow-label-local/install.txt
⭐ Source on GitHub 📦 Registry page
README

![CircleCI](https://circleci.com/gh/devops-workflow/terraform-local-label) terraform-local-label Terraform module to provide consistent label names and tags for resources. A single name format will not solve every use case, so multiple variants are returned and there is a few options to affect how they get build. The general name convention is {organization}-{environment}-{name}-{attributes}. Name is required, the other 3 can be turned on/off individually. The delimiter (-) can be changed All devops-workflow modules will eventually use this or labels. NOTE: local refers to this using locals and does not create any resources. It just builds new variables. Terraform registry: https://registry.terraform.io/modules/devops-workflow/label/local Usage: Basic Example ``hcl module "name" { source =

Inputs (14)
NameTypeDescriptionDefault
environmentanyEnvironment (ex: `dev`, `qa`, `stage`, `prod`). (Second or top level namespace. required
nameanyBase name for resource required
attributesanySuffix name with additional attributes (policy, role, etc.)[]
componentanyTAG: Underlying, dedicated piece of service (Cache, DB, ...)"UNDEF"
delimiteranyDelimiter to be used between `name`, `namespaces`, `attributes`, etc."-"
monitoranyTAG: Should resource be monitored"UNDEF"
namespace-envanyPrefix name with the environment. If true, format is: <env>-<name>true
namespace-organyPrefix name with the organization. If true, format is: <org>-<env namespaced namfalse
organizationanyOrganization name (Top level namespace)""
owneranyTAG: Owner of the service"UNDEF"
productanyTAG: Company/business product"UNDEF"
serviceanyTAG: Application (microservice) name"UNDEF"
tagsanyA map of additional tags{}
teamanyTAG: Department/team of people responsible for service"UNDEF"
Outputs (14)
attributes — Attribute string lowercase
environment — Environment name lowercase
id — Fully formatted name ID
id_20 — ID truncated to 20 characters
id_32 — ID truncated to 32 characters
id_attr_20 — ID max size 20 characters by truncating `id_org` then appending `attributes`
id_attr_32 — ID max size 32 characters by truncating `id_org` then appending `attributes`
id_env — If env namespace enabled <env>-<name> else <name>
id_org — If org namespace enabled <org>-<id_env> else <id_env>
name — Name lowercase
organization — Organization name lowercase
tags — Tags map merged with standard tags
org_attr_20 — Internal debugging. DO NOT USE
org_attr_32 — Internal debugging. DO NOT USE
Details
FrameworkTerraform Module
LanguageHCL
Version0.2.1
Cloud LOCAL
★ Stars4
Forks6
Total downloads127.0k
Inputs14
Outputs14
Examples7
Namespacedevops-workflow
Updated