diff --git a/common.tf b/common.tf index 0b11d38..aa00902 100644 --- a/common.tf +++ b/common.tf @@ -7,6 +7,7 @@ locals { instance_alias = var.instance_name == "" ? "waggledance" : format("waggledance-%s", var.instance_name) remote_metastore_zone_prefix = var.instance_name == "" ? "remote-metastore" : format("remote-metastore-%s", var.instance_name) + datadog_tags = join(" ", formatlist("%s:%s", keys(module.tags), values(module.tags))) } data "aws_caller_identity" "current" {} diff --git a/templates.tf b/templates.tf index fee7052..d145eb3 100644 --- a/templates.tf +++ b/templates.tf @@ -7,6 +7,7 @@ locals { default_exposed_endpoints = "health,info,metrics" exposed_endpoints = var.prometheus_enabled ? join(",", [local.default_exposed_endpoints, "prometheus"]) : local.default_exposed_endpoints + datadog_tags = local.datadog_tags } data "template_file" "endpoints_server_yaml" { diff --git a/templates/datadog-agent.json b/templates/datadog-agent.json index d2f49fb..56dd459 100644 --- a/templates/datadog-agent.json +++ b/templates/datadog-agent.json @@ -19,6 +19,10 @@ { "name": "ECS_FARGATE", "value": "true" + }, + { + "name": "DD_TAGS", + "value": "${datadog_tags}" } ], "healthCheck": {