Skip to content

Commit e9c6e23

Browse files
fix(elasticloadbalancingv2): cannot create UDP listener for dual-stack NLB (#32184)
### Issue # (if applicable) None ### Reason for this change NetworkListener has the validation that it does not create UDP listeners for dual-stack NLB. However, dual-stack NLB now supports the creation of UDP listeners, and this validation is no longer required. <https://aws.amazon.com/about-aws/whats-new/2024/10/aws-udp-privatelink-dual-stack-network-load-balancers/?nc1=h_ls> ### Description of changes - Remove this validation from NetworkListener class. ```ts if ( props.loadBalancer.ipAddressType === IpAddressType.DUAL_STACK && (props.protocol === Protocol.UDP || props.protocol === Protocol.TCP_UDP) ) { throw new Error('UDP or TCP_UDP listeners cannot be added to a dualstack network load balancer.'); } ``` - Add `enablePrefixIpv6SourceNat` to the `NetworkLoadbalancerProps` - It is essential to enable this parameter for UDP listener with dual-stack NLB. - ref: #32184 (comment) ### Description of how you validated changes Add both unit and integ tests. ### 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 parent 5ada161 commit e9c6e23

13 files changed

+2380
-29
lines changed

packages/@aws-cdk-testing/framework-integ/test/aws-elasticloadbalancingv2/test/integ.nlb-enable-prefix-for-ipv6-nat.js.snapshot/NlbEnablePrefixForIpv6NatStack.assets.json

+19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)