Skip to content

Commit 6035a50

Browse files
authored
Merge pull request #47 from matthosking-mydeal/master
cluster settings deprecation fix `capacity_providers`
2 parents 7826b97 + a871b1a commit 6035a50

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

ecs.tf

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
resource "aws_ecs_cluster" "ecs" {
22
name = var.name
33

4-
capacity_providers = compact([
5-
try(aws_ecs_capacity_provider.ecs_capacity_provider[0].name, ""),
6-
"FARGATE",
7-
"FARGATE_SPOT"
8-
])
9-
104
setting {
115
name = "containerInsights"
126
value = var.container_insights ? "enabled" : "disabled"
@@ -17,5 +11,14 @@ resource "aws_ecs_cluster" "ecs" {
1711
tags
1812
]
1913
}
14+
}
2015

16+
resource "aws_ecs_cluster_capacity_providers" "ecs" {
17+
cluster_name = aws_ecs_cluster.ecs.name
18+
19+
capacity_providers = compact([
20+
try(aws_ecs_capacity_provider.ecs_capacity_provider[0].name, ""),
21+
"FARGATE",
22+
"FARGATE_SPOT"
23+
])
2124
}

0 commit comments

Comments
 (0)