From 8a3b0c968d526332aab74ce599340f54589947b5 Mon Sep 17 00:00:00 2001 From: sthompsonCH Date: Fri, 6 Sep 2024 13:54:47 +0100 Subject: [PATCH] DSND-3056: Increase resources --- terraform/groups/ecs-service/main.tf | 1 + .../groups/ecs-service/profiles/live-eu-west-2/live/vars | 5 +++++ .../ecs-service/profiles/staging-eu-west-2/staging/vars | 5 +++++ terraform/groups/ecs-service/variables.tf | 5 +++++ 4 files changed, 16 insertions(+) diff --git a/terraform/groups/ecs-service/main.tf b/terraform/groups/ecs-service/main.tf index c7cae45..b69ae95 100644 --- a/terraform/groups/ecs-service/main.tf +++ b/terraform/groups/ecs-service/main.tf @@ -70,6 +70,7 @@ module "ecs-service" { name_prefix = local.name_prefix desired_task_count = var.desired_task_count max_task_count = var.max_task_count + min_task_count = var.min_task_count required_cpus = var.required_cpus required_memory = var.required_memory service_autoscale_enabled = var.service_autoscale_enabled diff --git a/terraform/groups/ecs-service/profiles/live-eu-west-2/live/vars b/terraform/groups/ecs-service/profiles/live-eu-west-2/live/vars index 3174842..df17c0d 100644 --- a/terraform/groups/ecs-service/profiles/live-eu-west-2/live/vars +++ b/terraform/groups/ecs-service/profiles/live-eu-west-2/live/vars @@ -2,3 +2,8 @@ environment = "live" aws_profile = "live-eu-west-2" # service configs use_set_environment_files = true + +min_task_count = 2 +max_task_count = 3 +required_cpus = 768 +required_memory = 1536 \ No newline at end of file diff --git a/terraform/groups/ecs-service/profiles/staging-eu-west-2/staging/vars b/terraform/groups/ecs-service/profiles/staging-eu-west-2/staging/vars index c70feee..65dcfc3 100644 --- a/terraform/groups/ecs-service/profiles/staging-eu-west-2/staging/vars +++ b/terraform/groups/ecs-service/profiles/staging-eu-west-2/staging/vars @@ -3,6 +3,11 @@ aws_profile = "staging-eu-west-2" # service configs use_set_environment_files = true +min_task_count = 1 +max_task_count = 2 +required_cpus = 768 +required_memory = 1536 + # scaling configs service_autoscale_enabled = true service_scaledown_schedule = "55 19 * * ? *" diff --git a/terraform/groups/ecs-service/variables.tf b/terraform/groups/ecs-service/variables.tf index 1faedc9..4cd68bb 100644 --- a/terraform/groups/ecs-service/variables.tf +++ b/terraform/groups/ecs-service/variables.tf @@ -37,6 +37,11 @@ variable "max_task_count" { description = "The maximum number of tasks for this service." default = 3 } +variable "min_task_count" { + default = 1 + type = number + description = "The minimum number of tasks for this service." +} variable "required_cpus" { type = number description = "The required cpu resource for this service. 1024 here is 1 vCPU"