stroeer/terraform-aws-ecs-fargate

Replacing target groups fails

moritzzimmer opened this issue · 1 comments

If the a ALB target group needs to be replaced (e.g. aws_alb_target_group.public because the container_port changed), this fails with:

Error deleting Target Group: ResourceInUse: Target group 'arn:aws:elasticloadbalancing:eu-west-1:12345678:targetgroup/my-service/1541e04161e7f3ef' is currently in use by a listener or a rule

see https://github.com/telia-oss/terraform-aws-ecs-fargate/blob/0f3cbc67c057625f1354f28f6ad4efc3763a8978/main.tf#L208 for a possible solution

retest this with latest release