enforce_lowercase

Type bool
Default null

Enforce lowercase tag values for consistency

Case Normalization

When enabled, all tag values are automatically converted to lowercase. This ensures consistency across resources and simplifies querying and filtering.

SettingInput ValueOutput Value
truePRODUCTIONproduction
truePlatform-Teamplatform-team
falsePRODUCTIONPRODUCTION
falsePlatform-TeamPlatform-Team

Best Practices

  • Enable lowercase enforcement for new projects
  • Maintain consistency with existing tag conventions
  • Consider case-sensitivity in downstream tools
  • Document the normalization behavior for teams

Example

module "tags" {
  source  = "registry.patterneddesigns.ca/standardnat/tagging-policy/aws"
  version = "1.1.0"

  required_tags     = ["Environment", "Owner"]
  enforce_lowercase = true

  default_tags = {
    Environment = "PRODUCTION"  # Normalized to "production"
    Owner       = "Platform-Team"  # Normalized to "platform-team"
  }
}

Considerations

  • Tag keys are not affected by this setting (only values)
  • Enabling this setting may cause drift if existing resources have mixed-case values
  • AWS Cost Explorer and other tools may be case-sensitive

Full Module Example

module "tagging_policy" {
  source  = "registry.patterneddesigns.ca/standardnat/tagging-policy/aws"
  version = "0.1.0"

  # enforce_lowercase
  enforce_lowercase = "..."

  # Other required inputs
}