labels

devops-workflow/labels/null

Terraform Module HCL NULL

Terraform module to create consistent naming for multiple names

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

![CircleCI](https://circleci.com/gh/devops-workflow/terraform-null-labels) terraform-null-labels Terraform module to provide consistent label names and tags for resources. This is similar to label except: - This accepts a list of names, instead of a string. And returns lists. - This uses null-resource instead of locals. This was required to be able to use count. - Currently this does not return tags The goal is to keep label and labels in sync and update both at the same time for any changes. Where this is possible. 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 ind

Inputs (15)
NameTypeDescriptionDefault
environmentanyEnvironment (ex: `dev`, `qa`, `stage`, `prod`). (Second or top level namespace. required
namesanyBase names for resources required
namespace-envanyPrefix name with the environment. If true, format is: <env>-<name>true
tagsanyA map of additional tags{}
teamanyTAG: Department/team of people responsible for service"UNDEF"
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-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"
enabledanySet to false to prevent the module from creating anythingtrue
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
org_attr_20 — Internal debugging. DO NOT USE
org_attr_32 — Internal debugging. DO NOT USE
Details
FrameworkTerraform Module
LanguageHCL
Version0.1.0
Cloud NULL
★ Stars1
Forks4
Total downloads5.3k
Inputs15
Outputs14
Examples6
Namespacedevops-workflow
Updated