@@ -20,7 +20,7 @@ data "aws_ami" "ecs_ami" {
2020
2121module "ecs" {
2222 source = " terraform-aws-modules/ecs/aws"
23- version = " 5.12.1 "
23+ version = " 7.3.0 "
2424
2525 cluster_name = " rpc-ecs-cluster"
2626
@@ -33,18 +33,13 @@ module "ecs" {
3333 }
3434 }
3535
36- default_capacity_provider_use_fargate = true
37-
38- fargate_capacity_providers = {
36+ cluster_capacity_providers = [" FARGATE" , " FARGATE_SPOT" ]
37+ default_capacity_provider_strategy = {
3938 FARGATE = {
40- default_capacity_provider_strategy = {
4139 weight = 20
42- }
4340 }
4441 FARGATE_SPOT = {
45- default_capacity_provider_strategy = {
4642 weight = 80
47- }
4843 }
4944 }
5045
@@ -53,6 +48,11 @@ module "ecs" {
5348 cpu = 2048
5449 memory = 4096
5550
51+ runtime_platform = {
52+ cpu_architecture = " ARM64"
53+ operating_system_family = " LINUX"
54+ }
55+
5656 # Container definition(s)
5757 container_definitions = {
5858 path = {
@@ -86,7 +86,7 @@ module "ecs" {
8686 credentialsParameter = " arn:aws:secretsmanager:us-east-2:975950814568:secret:GhcrCredentials-j8eElR"
8787 }
8888
89- port_mappings = [
89+ portMappings = [
9090 {
9191 name = " dd-rpc"
9292 containerPort = 3000
@@ -184,7 +184,7 @@ resource "aws_acm_certificate_validation" "validation" {
184184
185185module "alb" {
186186 source = " terraform-aws-modules/alb/aws"
187- version = " ~> 9.0 "
187+ version = " ~> 10.5 "
188188 name = " ${ local . name } -alb"
189189 load_balancer_type = " application"
190190 vpc_id = data. terraform_remote_state . vpc . outputs . vpc_id
0 commit comments