enforce_lowercase
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.
| Setting | Input Value | Output Value |
|---|---|---|
true | PRODUCTION | production |
true | Platform-Team | platform-team |
false | PRODUCTION | PRODUCTION |
false | Platform-Team | Platform-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
}