-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Using VPC in Cluster with CDK 0.32.0 does not work: Error: There are no 'Private' subnets in this VPC. Use a different VPC subnet selection #2631
Comments
I think the problem is that the class |
Is this a bug in the CDK or is there a way to change the code to make it work again with the latest version? |
I think it is a bug, but I managed to patch around it:
So I used VpcAttributes and told TypeScript to ignore the type mismatch. |
I also ran into this when using the VPC directly across stacks (in same app) on 0.31.0. The workaround was manually exporting/importing the VPC across stacks. |
We reuse cluster for ECS Fargate services. Importing a VPC is required to use an existing Cluster ( When importing an existing VPC,
This was using AWS CDK 0.32. Previously in AWS CDK 0.31 I was able to work around this by first calling Once the existing VPC was imported, I was able to import the cluster, without the error using:
|
Remove unnecessary import. Fixes #2631.
Remove unnecessary import call. Fixes #2631.
In CDK 0.31.0 our stack looked like this:
with CDK 0.32.0 we are forced to use a VPC with cluster import:
which causes an error
Error: There are no 'Private' subnets in this VPC. Use a different VPC subnet selection.
Somehow the cluster seems to lose the specified private subnets with this new model. Is there any workaround for this functionality?
The text was updated successfully, but these errors were encountered: