-
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
aws-ec2: PublicSubnet does not create route table with internet gateway #27333
Comments
Hi @priggad , thanks for reaching out. I tried with existing VPC and added another subnet with the code.Subnets can currently only be created in the following availability zones: us-east-1a, us-east-1b, us-east-1c, us-east-1d, us-east-1e, us-east-1f. This is the code I ran -
However, It succeeded with creating the local table for the newly created subnet but the route table to internet gateway was missing. Marking the issue as P2. |
Hello, I am seeing the same issue with the below code:
|
Any update on this? |
Hi @priggad ,Apologies for the oversight earlier, I went through issue reproduction again and In CDK Code, while creating PublicSubnet, a method aws-cdk/packages/aws-cdk-lib/aws-ec2/lib/vpc.ts Line 2383 in 7a8ae02
CDK Doc mentioning the same - https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.PublicSubnet.html#addwbrnatwbrgatewayeipallocationid Let me know if this is helpful! |
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
Describe the bug
I'm trying to create a public subnet in an existing vpc. My understanding is that, unlike a private subnet, a public subnet should be created with a route table that has a route to an internet gateway but the internet gateway route does not get created.
Expected Behavior
Expecting a subnet to be created with a routing table with a route to an internet gateway.
Current Behavior
A subnet is created but it does not have a route to an internet gateway
Reproduction Steps
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.96.2
Framework Version
No response
Node.js Version
18.17.1
OS
Fedora 38
Language
Typescript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: