-
-
Notifications
You must be signed in to change notification settings - Fork 631
Closed
Labels
Milestone
Description
Is your request related to a new offering from AWS?
Is this functionality available in the AWS provider for Terraform? See CHANGELOG.md, too.
- No 🛑: please wait to file a request until the functionality is avaialble in the AWS provider
- Yes ✅: please list the AWS provider version which introduced this functionality
Is your request related to a problem? Please describe.
- This ugly hack
terraform-aws-ecs/modules/service/main.tf
Lines 589 to 608 in 8b97783
# This allows us to query both the existing as well as Terraform's state and get # and get the max version of either source, useful for when external resources # update the container definition max_task_def_revision = local.create_task_definition ? max(aws_ecs_task_definition.this[0].revision, data.aws_ecs_task_definition.this[0].revision) : 0 task_definition = local.create_task_definition ? "${aws_ecs_task_definition.this[0].family}:${local.max_task_def_revision}" : var.task_definition_arn } # This allows us to query both the existing as well as Terraform's state and get # and get the max version of either source, useful for when external resources # update the container definition data "aws_ecs_task_definition" "this" { count = local.create_task_definition ? 1 : 0 task_definition = aws_ecs_task_definition.this[0].family depends_on = [ # Needs to exist first on first deployment aws_ecs_task_definition.this ] }
Describe the solution you'd like.
Describe alternatives you've considered.
Additional context
ivan-sukhomlyn, rdhar, bolshakoff, remiflament, yb-leakmited and 5 morerdhar, bolshakoff, luong-komorebi, sebastianarca and cbugneac-nex