diff --git a/API.md b/API.md
index d8248bc..dbb0654 100644
--- a/API.md
+++ b/API.md
@@ -483,6 +483,7 @@ public readonly peeringConfigs: {[ key: string ]: PeeringConfig};
| ingressNetworkACL
| NetworkACL[]
| *No description.* |
| routes
| AddRouteOptions[]
| *No description.* |
| tags
| {[ key: string ]: string}
| *No description.* |
+| useSubnetForNAT
| boolean
| *No description.* |
---
@@ -566,3 +567,13 @@ public readonly tags: {[ key: string ]: string};
---
+##### `useSubnetForNAT`Optional
+
+```typescript
+public readonly useSubnetForNAT: boolean;
+```
+
+- *Type:* boolean
+
+---
+
diff --git a/src/constructs/network.ts b/src/constructs/network.ts
index 6192736..3a90daf 100644
--- a/src/constructs/network.ts
+++ b/src/constructs/network.ts
@@ -56,6 +56,7 @@ export interface ISubnetsProps {
readonly egressNetworkACL?: NetworkACL[];
readonly routes?: AddRouteOptions[];
readonly tags?: Record;
+ readonly useSubnetForNAT?: boolean;
}
export interface VPCProps {
readonly vpc: ec2.VpcProps;
@@ -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);
}
});
});