From bc021beedb5e5bab0636e60b5cdc3c3b3bf62b8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20Ioni=C8=9B=C4=83?= Date: Mon, 16 Oct 2023 09:29:16 +0100 Subject: [PATCH] infra: scale down (#425) --- terraform/ecs.tf | 2 +- terraform/locals.tf | 4 ++-- terraform/service_api.tf | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/terraform/ecs.tf b/terraform/ecs.tf index a92709d1..51853b1e 100644 --- a/terraform/ecs.tf +++ b/terraform/ecs.tf @@ -7,7 +7,7 @@ module "ecs_cluster" { security_groups = [aws_security_group.ecs.id] instance_types = local.ecs.instance_types - min_size = 2 + min_size = 1 max_size = 3 minimum_scaling_step_size = 1 maximum_scaling_step_size = 1 diff --git a/terraform/locals.tf b/terraform/locals.tf index 9cbaa255..cc22d9cc 100644 --- a/terraform/locals.tf +++ b/terraform/locals.tf @@ -27,8 +27,8 @@ locals { db = { name = "votemonitor" - instance_class = "db.t4g.medium" - # instance_class = "db.t4g.micro" + instance_class = "db.t4g.micro" + # instance_class = "db.t4g.medium" } networking = { diff --git a/terraform/service_api.tf b/terraform/service_api.tf index 99cccdea..c5aac8e5 100644 --- a/terraform/service_api.tf +++ b/terraform/service_api.tf @@ -7,8 +7,8 @@ module "ecs_api" { name = "api-${var.env}" cluster_name = module.ecs_cluster.cluster_name - min_capacity = 2 - max_capacity = 4 + min_capacity = 1 + max_capacity = 3 image_repo = local.images.api.image image_tag = local.images.api.tag