Skip to content

Commit c906d87

Browse files
chrisbloechrisbloe-nhse
authored andcommitted
ECS capacity provider (FARGATE)
1 parent a805d2b commit c906d87

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

infrastructure/modules/ecs/service.tf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,20 @@ resource "aws_ecs_service" "ndr_ecs_service" {
3030
}
3131
}
3232

33+
resource "aws_ecs_cluster_capacity_providers" "fargate" {
34+
count = ecs_launch_type == "FARGATE" ? 1 : 0
35+
36+
cluster_name = aws_ecs_cluster.ndr_ecs_service.name
37+
38+
capacity_providers = ["FARGATE"]
39+
40+
default_capacity_provider_strategy {
41+
base = 1
42+
weight = 100
43+
capacity_provider = "FARGATE"
44+
}
45+
}
46+
3347
resource "aws_appautoscaling_target" "ndr_ecs_service_autoscale_target" {
3448
max_capacity = var.autoscaling_max_capacity
3549
min_capacity = var.autoscaling_min_capacity

0 commit comments

Comments
 (0)