tags

Type string
Module naming-convention
Version 0.1.0

Standard tags derived from naming convention inputs

The tags output provides a map of standard tags derived from the naming convention inputs. These tags ensure consistent resource tagging across your infrastructure.

Example Value

{
  Environment = "prod"
  Project     = "myapp"
  Region      = "use1"
  ManagedBy   = "terraform"
}

Common Use Cases

Direct Assignment

resource "aws_s3_bucket" "data" {
  bucket = "${module.naming.prefix}-data"
  tags   = module.naming.tags
}

Merging Additional Tags

resource "aws_instance" "web" {
  ami           = "ami-12345678"
  instance_type = "t3.micro"

  tags = merge(module.naming.tags, {
    Name     = "${module.naming.prefix}-web-01"
    Role     = "web-server"
    Schedule = "business-hours"
  })
}

Default Tags Provider Configuration

provider "aws" {
  region = "us-east-1"

  default_tags {
    tags = module.naming.tags
  }
}

Cost Allocation

These tags can be activated for AWS Cost Allocation reports to track spending by environment, project, and region.

Usage

module "naming_convention" {
  source  = "registry.patterneddesigns.ca/standardnat/naming-convention/aws"
  version = "0.1.0"
  # ... inputs
}

# Access this output
output "tags" {
  value = module.naming_convention.tags
}