Created
May 30, 2018 03:07
-
-
Save endofcake/25a169322a83fe29fb001db8b0c6a986 to your computer and use it in GitHub Desktop.
Use current ACTIVE task in ECS service definition
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get the current ACTIVE revision in ECS task family | |
data "aws_ecs_task_definition" "web" { | |
task_definition = "${module.web.ecs_task_family}" | |
} | |
resource "aws_ecs_service" "web" { | |
# Use the latest task revision - either the existing one, or the newly created | |
# if the task was updated. | |
task_definition = "${max("${aws_ecs_task_definition.web.revision}", "${var.ecs_task_current_revision}")}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment