From d47df782ab6b2d38bb5ffa79d797ad2d84c01d71 Mon Sep 17 00:00:00 2001 From: Dmitry Kireev Date: Sun, 26 Jun 2022 12:55:45 +0100 Subject: [PATCH] Add external sidecar container definitions --- main.tf | 9 ++++----- variables.tf | 6 ++++++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/main.tf b/main.tf index b1edb8d..b51b664 100644 --- a/main.tf +++ b/main.tf @@ -168,11 +168,10 @@ module "service" { sidecar_container_definitions = concat( - var.web_proxy_enabled ? [ - module.nginx.container_definition - ] : [], var.datadog_enabled ? [ - module.datadog.container_definition - ] : [], var.firelens_ecs_log_enabled ? local.fluentbit_container_definition : [] + var.sidecar_container_definitions, + var.web_proxy_enabled ? [ module.nginx.container_definition ] : [], + var.datadog_enabled ? [ module.datadog.container_definition ] : [], + var.firelens_ecs_log_enabled ? local.fluentbit_container_definition : [] ) docker_container_links = concat( diff --git a/variables.tf b/variables.tf index fc162d6..e08a4ab 100644 --- a/variables.tf +++ b/variables.tf @@ -322,6 +322,12 @@ variable "docker_container_command" { default = [] } +variable "sidecar_container_definitions" { + type = list(any) + description = "Sidecar container definitions for ECS task" + default = [] +} + variable "alb_idle_timeout" { description = "The time in seconds that the connection is allowed to be idle." type = number