merged_tags
Combined tags with defaults, required tags, and additional tags
The complete map of tags combining defaults, required tags, and additional tags. Use this output with AWS provider default_tags for automatic application to all resources.
Example Value
{
Environment = "production"
Owner = "platform-team"
CostCenter = "platform-123"
ManagedBy = "terraform"
Repository = "infrastructure"
}
Common Use Cases
Provider Default Tags
provider "aws" {
region = "us-east-1"
default_tags {
tags = module.tags.merged_tags
}
}
Resource-Specific Tags
resource "aws_s3_bucket" "data" {
bucket = "my-data-bucket"
tags = merge(
module.tags.merged_tags,
{
Name = "my-data-bucket"
}
)
}
Module Tags Parameter
module "vpc" {
source = "terraform-aws-modules/vpc/aws"
name = "production-vpc"
cidr = "10.0.0.0/16"
tags = module.tags.merged_tags
}
Usage
module "tagging_policy" {
source = "registry.patterneddesigns.ca/standardnat/tagging-policy/aws"
version = "0.1.0"
# ... inputs
}
# Access this output
output "merged_tags" {
value = module.tagging_policy.merged_tags
}