Describe the feature
Create a new SubnetType enum that is used to identify a Private subnet with a Transit Gateway Attachment. This should work in an identical way to PRIVATE_WITH_NAT.
Use Case
When importing existing VPCs to CDK using fromLookup, subnets which have no NAT Gateway are all considered PRIVATE_ISOLATED, even though some of these subnets do have an attached Transit Gateway and appropriate routes.
Proposed Solution
- Create enum SubnetType
PRIVATE_WITH_TGW.
- Update
fromLookup function as necessary to ensure subnets are correctly identified.
Other Information
In order to enable ZDT switching between NGW and TGW in the same VPC, we configure the routes to the TGW as 0.0.0.0/1 and 128.0.0.0/1. While it would be unreasonable to recursively search all of the IPv4 address space, I think the existence of these two routes pointing to the same location should be equivalent to a default route (0.0.0.0/0) check.
Acknowledgements
CDK version used
2.32.1
Environment details (OS name and version, etc.)
macOS 12.4
Describe the feature
Create a new SubnetType enum that is used to identify a Private subnet with a Transit Gateway Attachment. This should work in an identical way to
PRIVATE_WITH_NAT.Use Case
When importing existing VPCs to CDK using fromLookup, subnets which have no NAT Gateway are all considered
PRIVATE_ISOLATED, even though some of these subnets do have an attached Transit Gateway and appropriate routes.Proposed Solution
PRIVATE_WITH_TGW.fromLookupfunction as necessary to ensure subnets are correctly identified.Other Information
In order to enable ZDT switching between NGW and TGW in the same VPC, we configure the routes to the TGW as
0.0.0.0/1and128.0.0.0/1. While it would be unreasonable to recursively search all of the IPv4 address space, I think the existence of these two routes pointing to the same location should be equivalent to a default route (0.0.0.0/0) check.Acknowledgements
CDK version used
2.32.1
Environment details (OS name and version, etc.)
macOS 12.4