From 11a26178cb1e0d6be2d711fac8d0b44a27e76ccd Mon Sep 17 00:00:00 2001 From: JoshuaLicense Date: Fri, 19 Apr 2024 14:22:45 +0100 Subject: [PATCH] feat(terraform): add internal and selfserve ECS clusters (#70) --- infra/terraform/environments/dev/main.tf | 27 ++++++++++++++++++- infra/terraform/environments/dev/variables.tf | 12 +++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/infra/terraform/environments/dev/main.tf b/infra/terraform/environments/dev/main.tf index 4f8e12cb69..54be91c2d8 100644 --- a/infra/terraform/environments/dev/main.tf +++ b/infra/terraform/environments/dev/main.tf @@ -47,6 +47,31 @@ module "service" { data.aws_security_group.this["API"].id ] } + + "internal" = { + cpu = 1024 + memory = 4096 + + image = "${data.aws_ecr_repository.this["internal"].repository_url}:${var.internal_image_tag}" + + subnet_ids = data.aws_subnets.this["IUWEB"].ids + + security_group_ids = [ + data.aws_security_group.this["IUWEB"].id + ] + } + + "selfserve" = { + cpu = 1024 + memory = 4096 + + image = "${data.aws_ecr_repository.this["selfserve"].repository_url}:${var.selfserve_image_tag}" + + subnet_ids = data.aws_subnets.this["SSWEB"].ids + + security_group_ids = [ + data.aws_security_group.this["SSWEB"].id + ] + } } } - diff --git a/infra/terraform/environments/dev/variables.tf b/infra/terraform/environments/dev/variables.tf index 0f5a40ffc5..54f3f2eba4 100644 --- a/infra/terraform/environments/dev/variables.tf +++ b/infra/terraform/environments/dev/variables.tf @@ -3,3 +3,15 @@ variable "api_image_tag" { description = "The tag of the API image to deploy" default = "latest" } + +variable "selfserve_image_tag" { + type = string + description = "The tag of the selfserve image to deploy" + default = "latest" +} + +variable "internal_image_tag" { + type = string + description = "The tag of the internal image to deploy" + default = "latest" +}