Follow these best practices to get the most out of Patterned Designs modules.

Topics

General Guidelines

Version Pinning

Always pin module versions in production:

version = "1.2.3"  # Specific version

State Management

Use remote state backends for team environments:

  • S3 with DynamoDB locking
  • Terraform Cloud
  • Other supported backends

Code Organization

Structure your Terraform code by environment and component:

infrastructure/
├── environments/
│   ├── dev/
│   ├── staging/
│   └── production/
└── modules/
    └── (local wrapper modules)

Documentation

Document your infrastructure:

  • Describe the purpose of each configuration
  • Note any manual steps required
  • Keep READMEs up to date