-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
aws-elasticloadbalancingv2: fromApplicationLoadBalancerAttributes broken since v2.64.0 #24397
Comments
Probably related to #23853 as it introduced the new function |
Here is a zip containing the project files to reproduce the error on |
Hi @ChrisLane From what I can see, the fromApplicationLoadBalancerAttributes() method requires loadBalancerArn which is missing in your provided code. I see you have loadBalancerDnsName instead which is optional. I believe you need to specify And in aws-cdk/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-load-balancer.ts Line 531 in e08e34a
So I doubt you were able to import the ALB without passing |
@pahud the code in the example is taken from my production system and only slightly modified. I am unsure how I would get the If you try the example project that I linked and change the version to v2.63.2, you will see that it works. |
Yes sorry, my projects are all in JavaScript. The issue template doesn't offer JavaScript as an option. |
No problem but using TypeScript over JavaScript would allow you to have powerful type check from IDE and boost your coding performance with CDK. Is there any reason you need to us JS rather than TS in your project? |
Unfortunately that's a limitation for my team in particular since all of our other projects are JavaScript rather than TypeScript, we try to keep everything in the same language. |
I'm currently working around this issue by getting the load balancer via the elbv2.ApplicationLoadBalancer.fromLookup(
this,
"heimdall-application-load-balancer",
{
loadBalancerTags: {"elasticbeanstalk:environment-name": heimdallEnv.environmentName}
}); |
Describe the bug
Since v2.64.0, I can no longer import my application load balancer by its attributes from my elastic beanstalk environment.
This was working in v2.63.2.
Expected Behavior
The code in Reproduction Steps successfully gets the application load balancer for
heimdallApplicationLoadBalancer
as it did in v2.63.2.Current Behavior
The code in Reproduction Steps results in the following error when using aws-cdk v2.64.0 and above:
Reproduction Steps
I need to get my application load balancer via attributes since it is created by elasticbeanstalk but not available on the CfnEnvironment object. I need to pass the load balancer to create a CloudFront origin.
Example code:
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.64.0 (build fb67c77)
Framework Version
No response
Node.js Version
v19.7.0
OS
Arch Linux 6.2.1-zen1
Language
Typescript
Language Version
JavaScript
Other information
No response
The text was updated successfully, but these errors were encountered: