default_tags
Default tag values applied to all resources
Default Tag Configuration
Set organization-wide default tag values that are automatically applied to all resources. These tags provide consistent metadata without requiring manual specification on each resource.
Common Default Tags
| Tag Key | Example Value | Purpose |
|---|---|---|
ManagedBy | terraform | Infrastructure management tool |
Repository | infrastructure | Source repository |
Organization | acme-corp | Organization identifier |
CreatedBy | platform-team | Team that provisioned the resource |
Best Practices
- Use default tags for values that rarely change
- Include tooling and automation metadata
- Add repository information for traceability
- Avoid duplicating values that should be resource-specific
Example
module "tags" {
source = "registry.patterneddesigns.ca/standardnat/tagging-policy/aws"
version = "1.1.0"
required_tags = ["Environment", "Owner"]
default_tags = {
ManagedBy = "terraform"
Organization = "acme-corp"
Repository = "infrastructure"
CostCenter = "platform-123"
}
}
Merging Behavior
Default tags are merged with resource-specific tags. If a tag is specified both in defaults and on a resource, the resource-specific value takes precedence.
Full Module Example
module "tagging_policy" {
source = "registry.patterneddesigns.ca/standardnat/tagging-policy/aws"
version = "0.1.0"
# default_tags
default_tags = "..."
# Other required inputs
}