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

fix(ec2): export NatGatewayProvider for consistency with NatInstanceProvider #28810

Merged
merged 15 commits into from
Jul 31, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'main' into nat-gateway-export
# Conflicts:
#	packages/aws-cdk-lib/aws-ec2/test/vpc.test.ts
  • Loading branch information
crh23 committed Mar 5, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit adc54b08b042cee5b39268b2aaffe3128a0c76e5
19 changes: 19 additions & 0 deletions packages/aws-cdk-lib/aws-ec2/test/vpc.test.ts
Original file line number Diff line number Diff line change
@@ -1670,6 +1670,25 @@ describe('vpc', () => {
Template.fromStack(stack).resourceCountIs('AWS::EC2::Instance', 1);
});

test('natGateways controls amount of NAT instances V2', () => {
// GIVEN
const stack = getTestStack();

// WHEN
new Vpc(stack, 'TheVPC', {
natGatewayProvider: NatProvider.instanceV2({
instanceType: new InstanceType('q86.mega'),
machineImage: new GenericLinuxImage({
'us-east-1': 'ami-1',
}),
}),
natGateways: 1,
});

// THEN
Template.fromStack(stack).resourceCountIs('AWS::EC2::Instance', 1);
});

testDeprecated('can configure Security Groups of NAT instances with allowAllTraffic false', () => {
// GIVEN
const stack = getTestStack();
You are viewing a condensed version of this merge commit. You can view the full changes here.