We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 656af98 commit 0a6aff8Copy full SHA for 0a6aff8
data.tf
@@ -91,3 +91,7 @@ data "aws_iam_policy_document" "read_repository_credentials" {
91
]
92
}
93
94
+
95
+data "aws_ecs_task_definition" "task" {
96
+ task_definition = aws_ecs_task_definition.task.family
97
+}
main.tf
@@ -285,7 +285,7 @@ resource "aws_ecs_service" "service" {
285
name = var.name_prefix
286
287
cluster = var.cluster_id
288
- task_definition = aws_ecs_task_definition.task.arn
+ task_definition = "${aws_ecs_task_definition.task.family}:${max(aws_ecs_task_definition.task.revision, data.aws_ecs_task_definition.task.revision)}"
289
290
desired_count = var.desired_count
291
propagate_tags = var.propogate_tags
0 commit comments