-
Notifications
You must be signed in to change notification settings - Fork 4k
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
refactor(elbv2): make load balancer targets bind to interfaces #4132
Conversation
The `attachToApplicationTargetGroup()` (and similar for the NLB) methods of the load balancer target interfaces took a concrete TargetGroup class. This deviates from established CDK standards, and prevents their use with imported TargetGroups. Bring the code in line with expectations. Fixes #4121.
Thanks so much for taking the time to contribute to the AWS CDK ❤️ We will shortly assign someone to review this pull request and help get it
|
1 similar comment
Thanks so much for taking the time to contribute to the AWS CDK ❤️ We will shortly assign someone to review this pull request and help get it
|
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Make sure you check to see if there are any subsequent operations after the attach...
that attempts to mutate the attached group and would fail. The error messaging might need to be updated in these places.
if (targetGroup instanceof elbv2.ApplicationTargetGroup) { | ||
// Copy onto self if it's a concrete type. We need this for autoscaling | ||
// based on request count, which we cannot do with an imported TargetGroup. | ||
this.albTargetGroup = targetGroup; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix up the error messaging in the scaleOnRequestCount()
method. There are now two conditions when this.albTargetGroup
will be undefined
.
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
The
attachToApplicationTargetGroup()
(and similar for the NLB) methodsof the load balancer target interfaces took a concrete TargetGroup
class.
This deviates from established CDK standards, and prevents their use
with imported TargetGroups.
Bring the code in line with expectations.
Fixes #4121.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license