-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
ElasticLoadBalancerV2: migration to addAction() from addTargetGroups() fails because of logicalId change #29496
ElasticLoadBalancerV2: migration to addAction() from addTargetGroups() fails because of logicalId change #29496
Comments
Yes sounds like we can do that with a feature flag or just override the logicalId. |
…roups (under feature flag) (#29513) ### Issue ELBv2 logicalId inconsistency of ApplicationListenerRule logicalIds Mitigates #29496 ### Reason for this change People using ALBs who need to migrate from the `addTargetGroups()` convenience method to the lower level `addAction()` method should not be blocked due to inconsistent logicalId's. Further, the logicalIds should be consistent going forward. ### Description of changes There are two feature flags, one which sets a migration compat mode and another which fixed the behaviour to be consistent. ### Description of how you validated changes Unit testing. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
1 similar comment
|
Describe the bug
We need to access functionality not available in the
ApplicationListener.addTargetGroups()
helper method (specifically,ListenerAction.weightedForward()
). To do this, we've changed fromOld code
New code
However, when I do a cdk diff of the stack, I get
I note that https://github.com/aws/aws-cdk/blob/050a305d6be65df7e5f1e17668cbf512ead34d23/packages/aws-cdk-lib/aws-elasticloadbalancingv2/lib/alb/application-listener.ts#L675-L676 is adding the
Rule
suffix to the logicalId, which is driving a replacement rather than update.Expected Behavior
We should be able to go from the helper method to the underlying support method without a logicalId change.
Current Behavior
Because of the logicalId change, Cfn wants to replace our ListenerRules. Create before destroy means that Cfn tries to create a new ListenerRule with the same priority as the existing ListnerRule, which fails, blocking upgrade path.
Reproduction Steps
Sigh.
Possible Solution
Add a feature flag for not adding the
Rule
suffix to the logicalId in theaddAction()
method.Additional Information/Context
No response
CDK CLI Version
2.100.0 (build e1b5c77)
Framework Version
No response
Node.js Version
20.5.1
OS
MacOS
Language
TypeScript
Language Version
5.3.3
Other information
No response
The text was updated successfully, but these errors were encountered: