Skip to content

Commit 7d8caf9

Browse files
refactor(elasticloadbalancingv2-targets): update AlbTarget constructor (#27516)
This PR for elasticloadbalancingv2-targets is to change Constructor for AlbTarget to accept interface IApplicationLoadBalancer instead of ApplicationLoadBalancer. This helps it from being used alongside ApplicationLoadBalancer.fromLookup and ApplicationLoadBalancer.fromApplicationLoadBalancerAttributes. Closes #27466. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 3f6401c commit 7d8caf9

File tree

1 file changed

+1
-1
lines changed
  • packages/aws-cdk-lib/aws-elasticloadbalancingv2-targets/lib

1 file changed

+1
-1
lines changed

packages/aws-cdk-lib/aws-elasticloadbalancingv2-targets/lib/alb-target.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export class AlbTarget extends AlbArnTarget {
3939
* @param alb The application load balancer to load balance to
4040
* @param port The port on which the target is listening
4141
*/
42-
constructor(alb: elbv2.ApplicationLoadBalancer, port: number) {
42+
constructor(alb: elbv2.IApplicationLoadBalancer, port: number) {
4343
super(alb.loadBalancerArn, port);
4444
}
4545
}

0 commit comments

Comments
 (0)