Best Practices
Recommended patterns and conventions for using Patterned Designs modules.
Follow these best practices to get the most out of Patterned Designs modules.
Topics
- Naming Conventions - Consistent resource naming
- Tagging - Resource tagging strategies
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