Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions infra/opentofu/ecs/backend.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ terraform {
encrypt = true
}

required_version = ">= 1.0.0"
required_version = ">= 1.5.7"
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 5"
version = "~> 6.32.1"
}
}
}
Expand Down
20 changes: 10 additions & 10 deletions infra/opentofu/ecs/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ data "aws_ami" "ecs_ami" {

module "ecs" {
source = "terraform-aws-modules/ecs/aws"
version = "5.12.1"
version = "7.3.0"

cluster_name = "rpc-ecs-cluster"

Expand All @@ -33,18 +33,13 @@ module "ecs" {
}
}

default_capacity_provider_use_fargate = true

fargate_capacity_providers = {
cluster_capacity_providers = ["FARGATE", "FARGATE_SPOT"]
default_capacity_provider_strategy = {
FARGATE = {
default_capacity_provider_strategy = {
weight = 20
}
}
FARGATE_SPOT = {
default_capacity_provider_strategy = {
weight = 80
}
}
}

Expand All @@ -53,6 +48,11 @@ module "ecs" {
cpu = 2048
memory = 4096

runtime_platform = {
cpu_architecture = "ARM64"
operating_system_family = "LINUX"
}

# Container definition(s)
container_definitions = {
path = {
Expand Down Expand Up @@ -86,7 +86,7 @@ module "ecs" {
credentialsParameter = "arn:aws:secretsmanager:us-east-2:975950814568:secret:GhcrCredentials-j8eElR"
}

port_mappings = [
portMappings = [
{
name = "dd-rpc"
containerPort = 3000
Expand Down Expand Up @@ -184,7 +184,7 @@ resource "aws_acm_certificate_validation" "validation" {

module "alb" {
source = "terraform-aws-modules/alb/aws"
version = "~> 9.0"
version = "~> 10.5"
name = "${local.name}-alb"
load_balancer_type = "application"
vpc_id = data.terraform_remote_state.vpc.outputs.vpc_id
Expand Down
Loading