Skip to content
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

ElasticLoadBalancingV2: add dualstack NetworkLoadBalancer creation #27538

Closed
2 tasks
mausman4 opened this issue Oct 13, 2023 · 2 comments · Fixed by #27546
Closed
2 tasks

ElasticLoadBalancingV2: add dualstack NetworkLoadBalancer creation #27538

mausman4 opened this issue Oct 13, 2023 · 2 comments · Fixed by #27546
Labels
@aws-cdk/aws-elasticloadbalancingv2 Related to Amazon Elastic Load Balancing V2 effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2

Comments

@mausman4
Copy link

Describe the feature

Currently it is not possible to create a dualstack Network Load Balancer with the higher level construct, it is only possible with the lower level CfnLoadBalancer resource. Dualstack Network Load Balancers were introduced ~3 years ago.

Use Case

It is not possible to create a dualstack Network Load Balancer with the higher level construct. It is only possible with the lower level CfnLoadBalancer resource. There are limitations to the CfnLoadBalancer resource; it doesn't have an ARN property, it is not a valid RecordTarget.

Proposed Solution

add ipAddressType property to NetworkLoadBalancer. This is implemented for Application Load Balancers so can reference its implementation.

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.99.1

Environment details (OS name and version, etc.)

Amazon Linux 2 aarch64 5.10 Kernel

@mausman4 mausman4 added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Oct 13, 2023
@github-actions github-actions bot added the @aws-cdk/aws-elasticloadbalancingv2 Related to Amazon Elastic Load Balancing V2 label Oct 13, 2023
@mausman4 mausman4 changed the title ElasticLoadBalancingV2: dualstack NetworkLoadBalancer creation ElasticLoadBalancingV2: add dualstack NetworkLoadBalancer creation Oct 13, 2023
@pahud pahud self-assigned this Oct 13, 2023
@pahud
Copy link
Contributor

pahud commented Oct 13, 2023

I just noticed this

And this

https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-ip-address-type.html

Looks like NLB supports dualstack as well.

We can add this property for NLB:

export interface NetworkLoadBalancerProps extends BaseLoadBalancerProps {
/**
* Indicates whether cross-zone load balancing is enabled.
*
* @default false
*/
readonly crossZoneEnabled?: boolean;
}

@pahud pahud added p2 effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Oct 13, 2023
@pahud pahud removed their assignment Oct 13, 2023
sumupitchayan added a commit to lpizzinidev/aws-cdk that referenced this issue Dec 20, 2023
kaizencc added a commit to lpizzinidev/aws-cdk that referenced this issue Dec 23, 2023
mergify bot added a commit to lpizzinidev/aws-cdk that referenced this issue Dec 23, 2023
@mergify mergify bot closed this as completed in #27546 Dec 24, 2023
mergify bot pushed a commit that referenced this issue Dec 24, 2023
Adds support for dual-stack NetworkLoadBalancer via the [`ipAddressType`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-loadbalancer.html#cfn-elasticloadbalancingv2-loadbalancer-ipaddresstype) property.

Example:
```
const lb = new elbv2.NetworkLoadBalancer(this, 'LB', {
  vpc,
  internetFacing: true
  ipAddressType: elbv2.IpAddressType.DUAL_STACK,
});
```

Also, added validation to enforce that UDP or TCP_UDP listeners cannot be added to a dualstack NLB.

Closes #27538.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

paulhcsun pushed a commit to paulhcsun/aws-cdk that referenced this issue Jan 5, 2024
Adds support for dual-stack NetworkLoadBalancer via the [`ipAddressType`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-loadbalancer.html#cfn-elasticloadbalancingv2-loadbalancer-ipaddresstype) property.

Example:
```
const lb = new elbv2.NetworkLoadBalancer(this, 'LB', {
  vpc,
  internetFacing: true
  ipAddressType: elbv2.IpAddressType.DUAL_STACK,
});
```

Also, added validation to enforce that UDP or TCP_UDP listeners cannot be added to a dualstack NLB.

Closes aws#27538.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-elasticloadbalancingv2 Related to Amazon Elastic Load Balancing V2 effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants