-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Imported VPC Subnets show as Private (while they're public) #3706
Comments
Have you tagged your subnets? CDK requires your subnets are tagged when you import them aws-cdk:subnet-type - (Public/Private/Isolated) |
No I didn't, is there any documentation on this? My search skills seem to be letting me down. |
Hahahaa dude if you want documentation don't use CDK. there is some information about it in this bug report (which is how i figured it out). |
The VPC importer used to look at `MapPublicIpOnLaunch` as a shortcut for determining whether a Subnet was public or private. The correct way to do it is to look at the route table and see if it includes an Internet Gateway. Fixes #3706.
@reeseyc – sorry to hear you haven't had a good experience with CDK documentation. We want to fix that! Let us know if you have any specific feedback on what you liked, what you didn't, where you found gaps, etc. The more specific/concrete (i.e. in which API ref, which Construct, where in the Developer Guide, workshop, etc), the more likely we can get it fixed. |
@fulghum Hi Jason; we are facing 2 major challenges with CDK documentation. |
I find the requirement to tag subnets to be an arbitrary fix and a big impediment to adopting CDK. Often times VPCs and network related items are owned and managed by others and if every subnet in every VPC in every account has to be retro-tagged in order for a CDK app to function properly, the response will be something like, "it works with terribleform" . A big anti-pattern in my view, but hey just my 2p. |
The VPC importer used to look at `MapPublicIpOnLaunch` as a shortcut for determining whether a Subnet was public or private. The correct way to do it is to look at the route table and see if it includes an Internet Gateway. Fixes #3706.
🐛 Bug Report
What is the problem?
When I import a VPC with a single public subnet, CDK says there are no Public Subnets. Specifically:
There are no 'Public' subnets in this VPC. Use a different VPC subnet selection.
I'm using this to deploy a public ALB.
Reproduction Steps
Here's my route-table:
Stack:
Verbose Log
Environment
The text was updated successfully, but these errors were encountered: