telia-oss / terraform-aws-ecs-fargate

Terraform module which creates Fargate ECS resources on AWS.
https://registry.terraform.io/modules/telia-oss/ecs-fargate/aws
MIT License
82 stars 75 forks source link

ASG associated load balancer still fails #5

Closed lukaspour closed 4 years ago

lukaspour commented 5 years ago

I am still getting:

* aws_ecs_service.service: InvalidParameterException: The target group with targetGroupArn arn:aws:elasticloadbalancing:eu-west-1:770547935752:targetgroup/tf-20181101093848291700000004/5a67d904798508fe does not have an associated load balancer.
    status code: 400, request id: 42cf007b-deb1-11e8-b840-f320b8a37183 "cbm-api"

I saw the code but I guess the dependency with load balancer is missing.

itsdalmo commented 5 years ago

Not sure what is the latest workaround for this issue, but there is a difference between depends_on for the service in the regular ECS module and the fargate one:

According to this comment, adding depends_on = ["aws_alb_target_group.alb_target_group"] should solve it (as done in the regular ECS module), and according to another comment we need the target group to depend on the ALB. We could try them separately, or just do both to be safe? 😅

Assume you are still seeing this issue @lukaspour?

itsdalmo commented 4 years ago

Closing issue since it is stale.