-
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
Cannot create VPC without NAT Gateways #7619
Comments
Iam not sure if this is helpfull and it's not TS but I am able to create a VPC without a NAT-Gateway in python:
maybe it's a TS only behaviour |
Very weird. This error could be something related to the client-side state. @jcode-hub I tried your suggestion and it works originally. Code:
And then I tried to bit by bit add the missing parts back. It was working when code was: this.vpc = new Vpc(this, 'Vpc', {
cidr: '11.180.0.0/16',
vpnGateway: false,
subnetConfiguration: [
{ cidrMask: 23, name: 'Public', subnetType: SubnetType.PUBLIC },
{ cidrMask: 23, name: 'Isolated', subnetType: SubnetType.ISOLATED },
]
}) And then I tried adding Then I reset everything back to your minimal version 1. Run BTW is |
I can confirm this behaviour and the documentation says:
I guess a vpc must have a private subnet so that endpoint can get a private address |
I see. You may consider this issue is resolved then. It'd be good to improve the error message though. Thanks heaps 🙂 |
Gateway endpoints can't be added to a VPC that doesn't have private subnets. Unless indicated otherwise, make the gateway endpoints routable from all subnets. It'll only be routable from inside the VPC anyway (since it will have a private IP address). Fixes #7619.
Gateway endpoints can't be added to a VPC that doesn't have private subnets. Unless indicated otherwise, make the gateway endpoints routable from all subnets. It'll only be routable from inside the VPC anyway (since it will have a private IP address). Fixes #7619.
Gateway endpoints can't be added to a VPC that doesn't have private subnets. Unless indicated otherwise, make the gateway endpoints routable from all subnets. It'll only be routable from inside the VPC anyway (since it will have a private IP address). Fixes aws#7619.
I am trying to create a VPC without NAT Gateways. And I do not need private subnets.
Received error message
There are no 'Private' subnet groups in this VPC. Available types: Isolated,Public
when trying to create a new VPC via TypeScript CDK without a Private subnet.I have also tried a workaround - creating Private subnet but with amount of NAT Gateways set to 0. And then I received error message
If you do not want NAT gateways (natGateways=0), make sure you don't configure any PRIVATE subnets in 'subnetConfiguration' (make them PUBLIC or ISOLATED instead)
.I know the second scenario is not a bug. It's just here to show there is no successful workaround I could find.
Environment
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: