Terraform-provider-aws: Support ALB weighted target groups

Created on 20 Nov 2019  ยท  14Comments  ยท  Source: hashicorp/terraform-provider-aws

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

Application Load Balancers now support weighted target groups routing.

New or Affected Resource(s)

Potential Terraform Configuration

resource "aws_lb_listener_rule" "example" {
  action {
    type = "forward"
    ...
  }
}

References

Announcement.
Blog post.

Related:

Requires:

enhancement servicelbv2

Most helpful comment

Please try this #12574 implementation and vote ๐Ÿ‘ in the PR. Hope everything goes OK and is merged soon.

All 14 comments

Would this include support for the new conditions available on ALBs?

@kazeshini178 what do you mean by that? I think this is referring to https://aws.amazon.com/blogs/aws/new-application-load-balancer-simplifies-deployment-with-weighted-target-groups/ so it would add weighting to the target groups for listeners and listener rules and also the option for target group stickiness.

@kazeshini178 The new conditions you are looking for may be addressed by https://github.com/terraform-providers/terraform-provider-aws/issues/8126.

@ewbankkit Correct, was wondering if that was bundled as part of this request as that thread seems to have gone silent, though I only noticed now that the pull request for it is still active.

@ewbankkit @dpiddockcmp I don't think ask for weighted target groups is implemented through #8126

@srikanth787 is right, neither #8126 or #8268 include features requested above, which would be awesome ๐Ÿ™

Hello, I plan on using this feature soon on a project, is there an estimated time it will be available?

Enabling target-level stickiness requires that any weighted routing rules associated with this target group have group-level stickiness enabled first. If the target group is not part of a weighted routing rule, there are no prerequisites for enabling target-level stickiness.

Without support of group stickiness in ALB rules CodeDeploy fails with an error:

ERROR: CodeDeployBlueGreen: hudson.AbortException: CodeDeployBlueGreen: Deployment status [Failed] !!!:
code: ELASTIC_LOAD_BALANCING_INVALID
message: The ELB could not be updated due to the following error: You must enable group stickiness on a rule if you enabled target stickiness on one of its target groups.

Enabling target-level stickiness requires that any weighted routing rules associated with this target group have group-level stickiness enabled first. If the target group is not part of a weighted routing rule, there are no prerequisites for enabling target-level stickiness.

Without support of group stickiness in ALB rules CodeDeploy fails with an error:

ERROR: CodeDeployBlueGreen: hudson.AbortException: CodeDeployBlueGreen: Deployment status [Failed] !!!:
code: ELASTIC_LOAD_BALANCING_INVALID
message: The ELB could not be updated due to the following error: You must enable group stickiness on a rule if you enabled target stickiness on one of its target groups.

Check: https://github.com/terraform-providers/terraform-provider-aws/pull/11606/files#r366770507

Must be added to the documentation but I think is expected.

Enabling target-level stickiness requires that any weighted routing rules associated with this target group have group-level stickiness enabled first. If the target group is not part of a weighted routing rule, there are no prerequisites for enabling target-level stickiness.

Without support of group stickiness in ALB rules CodeDeploy fails with an error:

ERROR: CodeDeployBlueGreen: hudson.AbortException: CodeDeployBlueGreen: Deployment status [Failed] !!!:
code: ELASTIC_LOAD_BALANCING_INVALID
message: The ELB could not be updated due to the following error: You must enable group stickiness on a rule if you enabled target stickiness on one of its target groups.

Any ideas on how to fix this? Moving back to 0.12.19 yields same results.

For now I'm using a provisioner for this: https://gist.github.com/lucjross/e1a369a68103d198cb576af866c81b50

Please try this #12574 implementation and vote ๐Ÿ‘ in the PR. Hope everything goes OK and is merged soon.

This has been released in version 2.65.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!

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!

Was this page helpful?
0 / 5 - 0 ratings