-
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
cdk 0.36.0 generates wrong number of Subnets for VPC #3083
Comments
Ok, I got it. I wasn't aware of a the new configuration behavior which was introduced with #2922 From my example above I would have to setup the stack like so:
|
Yap... Thanks for following up. If you wish to use the default environment (as configured in the CLI), you could use the environment variables new TestStack(app, 'TestStack', {
env: {
region: process.env.CDK_DEFAULT_REGION,
account: process.env.CDK_DEFAULT_ACCOUNT,
}
}); This is not a recommended practice for production stacks, but awesome for dev stacks. |
I'm submitting a ...
What is the current behavior?
Create a VPC with the following Setup:
This code produces a CloudFormation Template with the following Subnets:
These are 6 Subnets distributed over 2 AZ but it should have been 9 Subnets distributed over 3 AZ.
Missing Subnets:
Maybe the AvailabilityZones are not correctly resolved or is there a new way of defining AvailabilityZones for the Stack anywhere (can't find anything)?
Even when I try to configure the region (Environment) not all 3 Zones of eu-central-1 are resolved.
What is the expected behavior (or behavior of feature suggested)?
CloudFormation Template should contain 9 Subnets (3 for each AZ)
Please tell us about your environment:
The text was updated successfully, but these errors were encountered: