separator

Type string
Default -

Character used to separate name components (default: hyphen for maximum compatibility)

Separator Options

The separator character joins the different components of your resource names. The default is a hyphen (-), which is the most widely compatible option.

Common Separators

SeparatorExampleCompatibility
Hyphen -prod-myapp-use1Universal
Underscore _prod_myapp_use1Most services
Period .prod.myapp.use1Limited

AWS Service Compatibility

Different AWS services have varying requirements for resource names:

ServiceAllowed SeparatorsNotes
S3-, .No underscores
EC2-, _Hyphens preferred
Lambda-, _Either works
RDS-Hyphens only
IAM-, _Both supported

Best Practices

  • Use hyphens (-) for maximum compatibility
  • Choose one separator and use it consistently
  • Avoid changing separators after initial deployment
  • Consider readability in AWS Console and CLI output
  • Test separator choice with all target AWS services

Full Module Example

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

  # separator
  separator = "..."

  # Other required inputs
  environment = "..."
  project = "..."
}