Tagging
Implement effective resource tagging for cost allocation and management.
Tags help you organize, track costs, and manage access to AWS resources.
Required Tags
We recommend these tags for all resources:
| Tag | Purpose | Example |
|---|---|---|
Environment | Deployment stage | production |
Application | Application name | webapp |
Owner | Team or person responsible | platform-team |
CostCenter | Billing allocation | engineering |
Optional Tags
| Tag | Purpose | Example |
|---|---|---|
Project | Project identifier | migration-2024 |
Compliance | Regulatory requirements | pci-dss |
DataClassification | Data sensitivity | confidential |
Implementation
Default Tags
Use Terraform’s default_tags in the provider:
provider "aws" {
default_tags {
tags = {
Environment = var.environment
Application = var.app_name
ManagedBy = "terraform"
}
}
}
Module Tags
Pass additional tags to modules:
module "vpc" {
source = "..."
tags = {
CostCenter = "networking"
}
}
Tag Policies
Enforce tagging with AWS Organizations tag policies or Terraform validation.
Cost Allocation
Enable cost allocation tags in AWS Billing to track spending by tag.
Next Steps
- Naming Conventions - Name resources consistently
- Guides - See tags in action