region_code
Optional region code for multi-region deployments (e.g., use1, euw1, apse1)
Region Code Conventions
The region code is an optional identifier that helps distinguish resources deployed across multiple AWS regions. This is particularly useful for multi-region architectures and disaster recovery setups.
Common Region Codes
| AWS Region | Code | Description |
|---|---|---|
| us-east-1 | use1 | N. Virginia |
| us-east-2 | use2 | Ohio |
| us-west-1 | usw1 | N. California |
| us-west-2 | usw2 | Oregon |
| eu-west-1 | euw1 | Ireland |
| eu-west-2 | euw2 | London |
| eu-central-1 | euc1 | Frankfurt |
| ap-southeast-1 | apse1 | Singapore |
| ap-northeast-1 | apne1 | Tokyo |
When to Use
Include region codes when:
- Deploying resources across multiple regions
- Implementing active-active or active-passive architectures
- Resources need to be uniquely identifiable across regions
- Cross-region resource references are common
Best Practices
- Set to
nullfor single-region deployments to keep names shorter - Use consistent abbreviation patterns across all regions
- Document your region code mappings in a central location
- Consider alphabetical sorting when choosing code formats
Full Module Example
module "naming_convention" {
source = "registry.patterneddesigns.ca/standardnat/naming-convention/aws"
version = "0.1.0"
# region_code
region_code = "..."
# Other required inputs
environment = "..."
project = "..."
}