Skip to content

Commit

Permalink
feat: configurable nat gateway Subnets (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
gagan1510 authored Aug 17, 2023
1 parent 47f84a9 commit c1073bf
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
11 changes: 11 additions & 0 deletions API.md

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

6 changes: 6 additions & 0 deletions src/constructs/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export interface ISubnetsProps {
readonly egressNetworkACL?: NetworkACL[];
readonly routes?: AddRouteOptions[];
readonly tags?: Record<string, string>;
readonly useSubnetForNAT?: boolean;
}
export interface VPCProps {
readonly vpc: ec2.VpcProps;
Expand Down Expand Up @@ -115,6 +116,11 @@ export class Network extends Construct {
sb instanceof ec2.PublicSubnet
) {
this.natSubnets.push(sb);
} else if (
sb instanceof ec2.PublicSubnet &&
subnetProps.useSubnetForNAT == true
) {
this.natSubnets.push(sb);
}
});
});
Expand Down

0 comments on commit c1073bf

Please sign in to comment.