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

ec2.Vpc.from_lookup fails to recognise any private subnets #3442

Closed
reeseyc opened this issue Jul 25, 2019 · 2 comments
Closed

ec2.Vpc.from_lookup fails to recognise any private subnets #3442

reeseyc opened this issue Jul 25, 2019 · 2 comments
Assignees
Labels
@aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud bug This issue is a bug. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Comments

@reeseyc
Copy link

reeseyc commented Jul 25, 2019

I'm submitting a 🪲 bug report

What is the current behavior?

When utilising an exisiting VPC to deploy, ec2.Vpc.from_lookup will fail to recognise any subnets other than the public subnets.
Any further attempt to deploy components to a Private subnet (through choice or design) will therefore fail

For instance:

eks cluster will not create as no private subnet
ecs cluster will not create as no private subnet
autoscaling group with subnet type set to private will not create

What is the expected behavior (or behavior of feature suggested)?
Private subnets should be detected by ec2.Vpc.from_lookup

OS: Windows 10

cdk --version

1.1.0 (build 1a11e96)

python --version

Python 3.7.4

@reeseyc reeseyc added the needs-triage This issue or PR still needs to be triaged. label Jul 25, 2019
@eladb eladb added the @aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud label Aug 13, 2019
@rix0rrr
Copy link
Contributor

rix0rrr commented Aug 28, 2019

Can you run describe-vpcs, describe-subnets and describe-route-tables on your VPC and post the results here?

Can you show the snippet you are using to import your VPC?

@rix0rrr rix0rrr added bug This issue is a bug. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. service/vpc and removed needs-triage This issue or PR still needs to be triaged. labels Aug 28, 2019
@reeseyc
Copy link
Author

reeseyc commented Aug 28, 2019

@rix0rrr
apologies i should have closed this. This is the same issue as #3706
the issue is cause by the fact that the subnets need to be tagged for VPCfromlookup to work; if you created the vpc outside of CDK then you need to add subnet tagging
I feel this is a documentation issue and should be clarified in the API reference that VPCfromSubnet requires these values to work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud bug This issue is a bug. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Projects
None yet
Development

No branches or pull requests

4 participants