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 the new alb target_type in aws_lb_target_group and aws_lb_target_group_attachment for Network Load Balancers #21069

Closed
KyleMarMcTVG opened this issue Sep 28, 2021 · 7 comments · Fixed by #21128
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/elbv2 Issues and PRs that pertain to the elbv2 service.
Milestone

Comments

@KyleMarMcTVG
Copy link

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 other comments that do not add relevant new information or questions, 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

AWS have added a new feature to Network Load Balancers, whereby they can now target an ALB via the ALB's ARN. This allows NLBs to perform level 4 load balancing and pass traffic directly to an ALB for level 7 load balancing.

New or Affected Resource(s)

  • aws_lb_target_group
  • aws_lb_target_group_attachment

Potential Terraform Configuration

resource "aws_lb_target_group" "alb_example" {
  name        = "tf-example-lb-tg"
  port        = 80
  protocol    = "HTTP"
  target_type = "alb"
  vpc_id      = aws_vpc.main.id
}

resource "aws_lb_target_group_attachment" "test" {
  target_group_arn = aws_lb_target_group.alb_example.arn
  target_id        = aws_lb.alb.arn
  port             = 80
}

References

@KyleMarMcTVG KyleMarMcTVG added the enhancement Requests to existing resources that expand the functionality or scope. label Sep 28, 2021
@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. service/elbv2 Issues and PRs that pertain to the elbv2 service. labels Sep 28, 2021
@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Sep 28, 2021
@ewbankkit
Copy link
Contributor

Requires AWS SDK v1.40.50:

As the target_type attribute is validated against the _Values() enum:

"target_type": {
Type: schema.TypeString,
Optional: true,
Default: elbv2.TargetTypeEnumInstance,
ForceNew: true,
ValidateFunc: validation.StringInSlice(elbv2.TargetTypeEnum_Values(), false),
},

, rebuilding with the relevant AWS SDK version should enable this feature.

@ricardo-aspira
Copy link

What is the expectation to have this ?

@ewbankkit
Copy link
Contributor

@ricardosouzamorais It will be available in v3.61.0 of the Terraform AWS Provider, likely later today.

@ricardo-aspira
Copy link

Awesome! :-) Thanks for sharing that.

@pjaudiomv
Copy link
Contributor

I just tested this out and works great, was able to swap out one of my lambdas and just use the alb as a target. Thank you.

@github-actions
Copy link

github-actions bot commented Oct 8, 2021

This functionality has been released in v3.62.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. Thank you!

@github-actions
Copy link

github-actions bot commented Jun 3, 2022

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 3, 2022
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/elbv2 Issues and PRs that pertain to the elbv2 service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants