-
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
(ec2.Vpc): (max_azs=3 does not take effect) #30732
Comments
Hi @syangdh , thanks for reaching out. I tried to deploy the VPC in the us-west-2 region and 9 subnets were successfully created. Sharing the code snippet in typescript (deplying in python meanwhile) and Subnets snapshot - const vpc = new ec2.Vpc(this, 'Ecissue01Vpc', {
ipAddresses :ec2.IpAddresses.cidr('10.0.0.0/16'),
maxAzs: 3,
natGateways: 1,
subnetConfiguration: [
{
cidrMask: 24,
name: 'public',
subnetType: ec2.SubnetType.PUBLIC,
},
{
cidrMask: 24,
name: 'private',
subnetType: ec2.SubnetType.PRIVATE_WITH_EGRESS,
},
{
cidrMask: 24,
name: 'isolated',
subnetType: ec2.SubnetType.PRIVATE_ISOLATED
}]
});
const app = new cdk.App();
new Ecissue01Stack(app, 'Ecissue01Stack', {
env: { account: '************', region: 'us-west-2' },
});
Subnets created in us-west-2 - Could you please check the code and see if something is missing from your side? |
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. |
Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one. |
Describe the bug
I am trying to create a VPC with 3 AZs, but it turns out it only used 2 AZ, i.e., only have 6 subnets instead of 9 subnets
Expected Behavior
It should have created 9 subnets, but instead it created 6 subnets (My region is us-west-2)
Current Behavior
only 2 Az were used for the subnet creation
Reproduction Steps
Code is posted above
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.147.1 (build d3695d4)
Framework Version
No response
Node.js Version
v22.2.0
OS
mac OS
Language
Python
Language Version
Python
Other information
No response
The text was updated successfully, but these errors were encountered: