From 123ae975fc2fd15fbd3e4c35b1b586cfb972aa55 Mon Sep 17 00:00:00 2001 From: roy-dydx <133032749+roy-dydx@users.noreply.github.com> Date: Mon, 30 Sep 2024 14:36:53 -0400 Subject: [PATCH] Add variable for number of desired service instances (#140) * Update variables.tf * Update locals.tf * Update locals.tf * Update locals.tf --- indexer/locals.tf | 6 +++--- indexer/variables.tf | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/indexer/locals.tf b/indexer/locals.tf index b20af218..346d5ca2 100644 --- a/indexer/locals.tf +++ b/indexer/locals.tf @@ -55,7 +55,7 @@ locals { ), }, "${local.service_names["comlink"]}" : { - ecs_desired_count : 5, + ecs_desired_count : var.comlink_ecs_desired_count, task_definition_memory : 4096, task_definition_cpu : 2048, is_public_facing : true, @@ -101,7 +101,7 @@ locals { ), }, "${local.service_names["socks"]}" : { - ecs_desired_count : 5, + ecs_desired_count : var.socks_ecs_desired_count, task_definition_memory : 20480, task_definition_cpu : 4096, is_public_facing : true, @@ -203,7 +203,7 @@ locals { ), }, "${local.service_names["vulcan"]}" : { - ecs_desired_count : 5, + ecs_desired_count : var.vulcan_ecs_desired_count, task_definition_memory : 8192, task_definition_cpu : 4096, is_public_facing : false, diff --git a/indexer/variables.tf b/indexer/variables.tf index 30c46764..07c7d191 100644 --- a/indexer/variables.tf +++ b/indexer/variables.tf @@ -478,3 +478,21 @@ variable "image_count" { description = "Number of images to store for ECR, defaults to 100." default = 100 } + +variable "vulcan_ecs_desired_count" { + type = number + description = "Number of desired vulcan instances." + default = 5 +} + +variable "comlink_ecs_desired_count" { + type = number + description = "Number of desired comlinnk instances." + default = 5 +} + +variable "socks_ecs_desired_count" { + type = number + description = "Number of desired socks instances." + default = 5 +}