Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for attaching multiple target groups to one ECS service #9571

Closed
poflynn opened this issue Jul 31, 2019 · 4 comments
Closed

Support for attaching multiple target groups to one ECS service #9571

poflynn opened this issue Jul 31, 2019 · 4 comments
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ecs Issues and PRs that pertain to the ecs service.
Milestone

Comments

@poflynn
Copy link

poflynn commented Jul 31, 2019

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

Previously only one target group could point to one ECS service at a time. Amazon now supports having multiple target groups pointing to a single ECS service

New or Affected Resource(s)

  • aws_ecs_service

Potential Terraform Configuration

I would imagine code might look like this. Note that in the "load_balancer" section the "target_group_arn" is a list and not a single item like it is today altho this might cause backward compatibility issues so maybe isn't the right answer.

resource "aws_ecs_service" "example_ecs" {
  name                               = "example-ecs"
  task_definition                    = "${aws_ecs_task_definition.service_task_def.id}"
  desired_count                      = "3"
  deployment_minimum_healthy_percent = "50"

  cluster  = "cluster-ecs"
  iam_role = "${aws_iam_role.ecs_service_role.arn}"

  load_balancer {
    target_group_arn = "[
      ${aws_lb_target_group.target_group1.arn}, 
      ${aws_lb_target_group.target_group2.arn},
    ]"
    container_name   = "container_name"
  }

References

See post below for more detail (dated July 30, 2019).
https://aws.amazon.com/about-aws/whats-new/2019/07/amazon-ecs-services-now-support-multiple-load-balancer-target-groups/

@poflynn poflynn added the enhancement Requests to existing resources that expand the functionality or scope. label Jul 31, 2019
@ghost ghost added the service/ecs Issues and PRs that pertain to the ecs service. label Jul 31, 2019
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Jul 31, 2019
@bflad bflad added this to the v2.22.0 milestone Jul 31, 2019
@bflad
Copy link
Contributor

bflad commented Jul 31, 2019

Hi @poflynn 👋 Support for multiple target groups (via multiple load_balancer configuration blocks) has already been merged (#9411) and will release with version 2.22.0 of the Terraform AWS Provider, tomorrow. 👍

@bflad bflad closed this as completed Jul 31, 2019
@poflynn
Copy link
Author

poflynn commented Jul 31, 2019

Ah, I did a search only of open issues, it never occurred to me that it would have already been closed! Thanks!! @bflad

@ghost
Copy link

ghost commented Aug 1, 2019

This has been released in version 2.22.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

@ghost
Copy link

ghost commented Nov 2, 2019

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Nov 2, 2019
@breathingdust breathingdust removed the needs-triage Waiting for first response or review from a maintainer. label Sep 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ecs Issues and PRs that pertain to the ecs service.
Projects
None yet
Development

No branches or pull requests

3 participants