From d980285650986f9b1362c1c6ac63b901cd86371e Mon Sep 17 00:00:00 2001 From: Ali Bahman Date: Mon, 13 Jan 2025 15:56:21 +0000 Subject: [PATCH] DP-1056 Add missing ECR configs (#1127) --- terragrunt/modules/orchestrator/ecr/locals.tf | 21 ++++++++++++------- .../modules/orchestrator/ecr/variables.tf | 14 ++++++++++++- 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/terragrunt/modules/orchestrator/ecr/locals.tf b/terragrunt/modules/orchestrator/ecr/locals.tf index 429a16e06..fa8aa11f9 100644 --- a/terragrunt/modules/orchestrator/ecr/locals.tf +++ b/terragrunt/modules/orchestrator/ecr/locals.tf @@ -4,13 +4,18 @@ locals { read_principals = [for name, id in var.account_ids : "arn:aws:iam::${id}:root"] - tools_repositories = ["grafana", "codebuild", "pgadmin", "healthcheck"] - - repositories = concat( - [ - for name, config in var.service_configs : - config.name - ], - local.tools_repositories) + + service_repositories = [ + for name, config in var.service_configs : + config.name + ] + + tools_repositories = concat([ + for name, config in var.tools_configs : + config.name + ], ["codebuild"] ) + + repositories = concat(local.service_repositories, local.tools_repositories) + } diff --git a/terragrunt/modules/orchestrator/ecr/variables.tf b/terragrunt/modules/orchestrator/ecr/variables.tf index eb676dbf8..7fbcabd5d 100644 --- a/terragrunt/modules/orchestrator/ecr/variables.tf +++ b/terragrunt/modules/orchestrator/ecr/variables.tf @@ -18,7 +18,19 @@ variable "product" { } variable "service_configs" { - description = "Map of services to their ports" + description = "Map of services and their attributes" + type = map(object({ + cpu = number + memory = number + name = string + port = number + port_host = number + })) +} + + +variable "tools_configs" { + description = "Map of tools and their attributes" type = map(object({ cpu = number memory = number