Infrastructure Naming Standard¶
Version 1.0 — Applies to all new AWS infrastructure managed via Terraform. Legacy resources keep existing names until migrated.
Purpose¶
- Ensure consistency across regions and environments
- Support long-term scalability
- Simplify automation and auditing
- Replace legacy numeric server naming
- Align with AWS and modern infrastructure practices
Core Naming Format¶
All AWS resource names must follow this format:
Examples:
prod-euc1-vault-clickhouse
prod-euc1-vault-clickhouse-1
prod-euc1-vault-ecs-cluster
prod-euc1-vault-internal-alb
stage-euc1-vault-etl-worker
prod-euw1-atrax-api
Components¶
Environment¶
| Environment | Value |
|---|---|
| Production | prod |
| Staging | stage |
| Testing | test |
| Development | dev |
Region¶
| AWS Region | Code |
|---|---|
| eu-central-1 | euc1 |
| eu-west-1 | euw1 |
Define a short code for any new region before use.
Group¶
| Group | Description |
|---|---|
core |
Core application services |
vault |
Consent storage and processing |
edge |
Edge delivery systems |
atrax |
Atrax subsystem |
common |
Shared infrastructure components |
Service¶
Descriptive logical service name. Must be stable across deployments. Avoid abbreviations unless widely understood.
Examples: clickhouse, ecs-cluster, etl-worker, api, internal-alb, sqs-ingest, iam-role, security-group
Index (optional)¶
Used only when multiple fixed instances exist (e.g. replica pairs, explicit cluster members). Do not use indexes for autoscaled or dynamic services.
DNS Naming Standard¶
Internal services use service-based DNS, not host-based DNS.
Private hosted zone: internal.cookiehub.net
Format:
Examples:
Cluster nodes (when needed):
Clients must connect to service-level DNS, not individual node DNS.
AWS Tagging Standard¶
All Terraform-managed resources must include these tags:
| Tag Key | Example Value |
|---|---|
Name |
prod-euc1-vault-clickhouse |
Environment |
prod |
Region |
eu-central-1 |
Group |
vault |
Service |
clickhouse |
ManagedBy |
terraform |
Optional but recommended:
| Tag Key | Purpose |
|---|---|
Owner |
Team or responsible person |
CostCenter |
Finance mapping |
Criticality |
low, medium, high |
Tags are mandatory identity. Hostnames are not primary identifiers.
Principles¶
- Name logical services, not machines.
- Avoid numeric naming unless technically required.
- Keep names human-readable.
- Keep names stable across deployments.
- Do not encode implementation details in names.
- Use tags as first-class metadata.
- Prefer descriptive names over short cryptic codes.
Examples Summary¶
| Resource Type | Name Example |
|---|---|
| ClickHouse EC2 | prod-euc1-vault-clickhouse |
| ClickHouse replica | prod-euc1-vault-clickhouse-2 |
| ECS Cluster | prod-euc1-vault-ecs-cluster |
| Internal ALB | prod-euc1-vault-internal-alb |
| SQS Queue | prod-euc1-vault-sqs-ingest |
| IAM Role | prod-euc1-vault-ecs-task-role |
Legacy Infrastructure¶
Existing infrastructure using the old numeric naming system remains unchanged until replaced. All new infrastructure must follow this document. Migration occurs gradually during refactors or system upgrades.