Cost Allocation

module "cost_tags" {
  source  = "registry.patterneddesigns.ca/standardnat/tagging-policy/aws"
  version = "1.1.0"

  required_tags = [
    "CostCenter",
    "Project",
    "Team",
    "Environment"
  ]

  default_tags = {
    ManagedBy  = "terraform"
    BillingOrg = "engineering"
  }

  tag_values = {
    Environment = ["dev", "staging", "prod"]
    CostCenter = [
      "eng-001",
      "platform-002",
      "data-003",
      "ops-004"
    ]
  }

  enforce_lowercase = true
}

# Apply cost allocation tags
provider "aws" {
  default_tags {
    tags = module.cost_tags.merged_tags
  }
}

# Export for AWS Cost Allocation Tags setup
output "cost_allocation_tags" {
  value = [
    "CostCenter",
    "Project",
    "Team"
  ]
  description = "Tags to activate in AWS Cost Allocation Tags"
}