-
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
VpcNetwork should throw a descriptive error when selecting 0 subnets #2011
VpcNetwork should throw a descriptive error when selecting 0 subnets #2011
Comments
Yes, |
Note to future implementors: not in all cases; sometimes consumers will do analysis on the list of subnets returned, and it's okay for it to be empty. Honestly, it's probably better to add an API |
Selecting 0 subnets is invalid for most CFN resources. We move the check for this upstream to the VPC construct, which can throw a nicely descriptive error message if it happens to not contain any subnets that match the type we're looking for. The alternative is that the error happens during CloudFormation deployment, but then it's not very clear anymore what the cause for the error was. Fixes #2011.
Selecting 0 subnets is invalid for most CFN resources. We move the check for this upstream to the VPC construct, which can throw a nicely descriptive error message if it happens to not contain any subnets that match the type we're looking for. The alternative is that the error happens during CloudFormation deployment, but then it's not very clear anymore what the cause for the error was. Fixes #2011. BREAKING CHANGE: `vpcPlacement` has been renamed to `vpcSubnets` on all objects, `subnetsToUse` has been renamed to `subnetType`. `natGatewayPlacement` has been renamed to `natGatewaySubnets`.
Trying to set up a ecs cluster with asg in a existing non-cdk managed vpc.
The
externalVpc
is used without issue when working with Lambdas, but with ASG it fails due to AvailabilityZones being empty, but they do exist and they do work with at least one other resource.results in
The actual error is that
vpcPlacement: { subnetsToUse: SubnetType.Public }
is missing in the config toconfig.addCapacity
.vpcPlacement
is an optional parameter, but without it you get an error in this case.The text was updated successfully, but these errors were encountered: