-
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
(aws-elasticloadbalancingv2): Cannot use a single application load balancer as a target for the network load balancer #17208
Comments
We had the same (intermittent) issue in one of our stacks. It depends on whether the ALB listener gets created first before the NLB - which I found can vary. const svc = new patterns.ApplicationLoadBalancedFargateService(this, 'Service', {
// ...
});
const nlbTargetGroup = listener.addTargets('Targets', {
targets: [new targets.AlbTarget(svc.loadBalancer, 80)],
port: 80,
healthCheck: {
protocol: elbv2.Protocol.HTTP,
},
});
nlbTargetGroup.node.addDependency(svc.listener); |
This is a open existing issue and needs to be resolved. |
I've just had the same issue..... |
I'm using yaml to describe resources and solved the same issue by moving my app load balancer description to the top of the file (before the network lb description). |
I have the same issue with java code:
|
This PR was abandoned, it seems like it could still be a suitable solution if anyone wants to pick it up from where it was left off #17248 |
I've been trying to reproduce this on cdk 2.84 in various US regions and I haven't been able to do so in about 20 attempts. |
CDK 2.92 I ran into a second issue though, when trying to destroy the environment it errors out because it tries to delete the ALB before deleting its target. Error message: What's interesting about this is that the AWS Console allows me to delete the ALB without any issue. Then I can delete the stack without any issues. Either way, I was able to solve my problem with the help of @jamesorlakin 's recommendation |
…Bs, deprecate AlbTarget due to ALB listener race conditions (aws#17208)
This PR is Good to Review #30396 |
@Leo10Gama , Where should I reach out to get my contribution reviewed by community? |
Hi @stm29! Feel free to reach out on the cdk.dev Slack |
@Leo10Gama , I tried reaching out in both #aws-cdk and #contributing channel. I am unable to find a community reviewer(trusted cdk reviewer). It's been sitting here for more than 2 weeks without a review. It would be more helpful if I am getting an initial review at least. What would be the best way to take it forward. |
Comments on closed issues and PRs are hard for our team to see. |
1 similar comment
Comments on closed issues and PRs are hard for our team to see. |
What is the problem?
I am trying to use a single application load balancer as a target for the network load balancer and I am defining this in CDK. Whenever I try to deploy this I get an errorMsg and the stack fails to deploy
Reproduction Steps
Use the example code on https://docs.aws.amazon.com/cdk/api/latest/docs/aws-elasticloadbalancingv2-readme.html#using-application-load-balancer-targets in a stack.
This is my code (adjusted example from above) that fails:
What did you expect to happen?
I expected stack to de deployed OK.
What actually happened?
CDK CLI Version
1.127.0 (build 0ea309a)
Framework Version
No response
Node.js Version
v16.4.2
OS
System Version: macOS 11.5.2 (20G95) Kernel Version: Darwin 20.6.0
Language
Typescript
Language Version
Typescript Version 3.9.10
Other information
No response
The text was updated successfully, but these errors were encountered: