From 0a2bad067f1e3d57e90c21f49c5ca2953bc323d0 Mon Sep 17 00:00:00 2001 From: Boukoufallah Brahim Date: Tue, 20 Jan 2026 15:04:19 +0100 Subject: [PATCH 1/2] feat(ecs): Add support for tag propagation This commit introduces a new propagate_tags variable to the remote ingestion executor module. This allows users to control whether tags from the ECS service or task definition are propagated to the running tasks. This is useful for costs analysis. The variable defaults to SERVICE and accepts SERVICE, TASK_DEFINITION, or NONE as valid values --- remote-ingestion-executor/main.tf | 2 ++ remote-ingestion-executor/variables.tf | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/remote-ingestion-executor/main.tf b/remote-ingestion-executor/main.tf index 5ff689b..a848731 100644 --- a/remote-ingestion-executor/main.tf +++ b/remote-ingestion-executor/main.tf @@ -41,6 +41,8 @@ module "ecs_service" { security_group_rules = var.security_group_rules assign_public_ip = var.assign_public_ip + propagate_tags = var.propagate_tags + container_definitions = { dh-remote-executor = { cpu = var.cpu diff --git a/remote-ingestion-executor/variables.tf b/remote-ingestion-executor/variables.tf index e9f8a33..0303f4e 100644 --- a/remote-ingestion-executor/variables.tf +++ b/remote-ingestion-executor/variables.tf @@ -142,6 +142,17 @@ variable "assign_public_ip" { default = true } +variable "propagate_tags" { + description = "Whether to propagate the tags from the task definition or the service to the tasks. The valid values are SERVICE and TASK_DEFINITION" + type = string + default = "NONE" + + validation { + condition = contains(["SERVICE", "TASK_DEFINITION", "NONE"], upper(var.propagate_tags)) + error_message = "propagate_tags must be one of SERVICE, TASK_DEFINITION, or NONE." + } +} + variable "enable_cloudwatch_logging" { description = "Determines whether CloudWatch logging is configured for the container definition" type = bool From 23b9639ca4c1fb2669e9d005762b07227d646eb6 Mon Sep 17 00:00:00 2001 From: Boukoufallah Brahim Date: Tue, 20 Jan 2026 15:11:06 +0100 Subject: [PATCH 2/2] chore: ensure propagate tags is passed in uppercase --- remote-ingestion-executor/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/remote-ingestion-executor/main.tf b/remote-ingestion-executor/main.tf index a848731..fe1831f 100644 --- a/remote-ingestion-executor/main.tf +++ b/remote-ingestion-executor/main.tf @@ -41,7 +41,7 @@ module "ecs_service" { security_group_rules = var.security_group_rules assign_public_ip = var.assign_public_ip - propagate_tags = var.propagate_tags + propagate_tags = upper(var.propagate_tags) container_definitions = { dh-remote-executor = {