Skip to content

Commit

Permalink
feat(ecs-patterns): dualstack NLB (#30069)
Browse files Browse the repository at this point in the history
### Issue # (if applicable)

Closes #29614.

### Reason for this change

Dualstack NLB is not supported in `NetworkLoadBalancedServiceBase`.

### Description of changes

- Add `ipAddressType` to `NetworkLoadBalancedServiceBaseProps`.
  - default value is `IpAddressType.Ipv4`

### 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*
  • Loading branch information
badmintoncryer authored May 17, 2024
1 parent 411a58c commit 623cedb
Show file tree
Hide file tree
Showing 22 changed files with 35,452 additions and 18 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -889,6 +889,7 @@
"myServiceLB168895E1": {
"Type": "AWS::ElasticLoadBalancingV2::LoadBalancer",
"Properties": {
"IpAddressType": "ipv4",
"LoadBalancerAttributes": [
{
"Key": "deletion_protection.enabled",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Cluster, ContainerImage, AsgCapacityProvider, EcsOptimizedImage } from
import { App, Stack } from 'aws-cdk-lib';
import * as integ from '@aws-cdk/integ-tests-alpha';
import { NetworkLoadBalancedEc2Service } from 'aws-cdk-lib/aws-ecs-patterns';
import { IpAddressType } from 'aws-cdk-lib/aws-elasticloadbalancingv2';

const app = new App();
const stack = new Stack(app, 'aws-ecs-integ-nlb');
Expand Down Expand Up @@ -56,6 +57,7 @@ new NetworkLoadBalancedEc2Service(stack, 'myService', {
weight: 2,
},
],
ipAddressType: IpAddressType.IPV4,
});

new integ.IntegTest(app, 'networkLoadBalancedEc2ServiceTest', {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 623cedb

Please sign in to comment.