You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(ec2): internet gateway is created even if public subnets are reserved (#28607)
This PR fixes that Internet Gateway will be created even if (all) public subnets are reserved.
The `reserved` option is for not actually creating subnet resources. So IGW should not be created if all public subnets are reserved, because there is no public subnets in the VPC.
It would be appropriate to consider the `reserved` option since [we originally did not want to create an IGW if there was no public subnets](https://github.com/aws/aws-cdk/blob/v2.118.0/packages/aws-cdk-lib/aws-ec2/lib/vpc.ts#L1493-L1497).
Also, if this bug is not fixed, it will go to the [code where the NatGateway is created](https://github.com/aws/aws-cdk/blob/v2.118.0/packages/aws-cdk-lib/aws-ec2/lib/vpc.ts#L1513-L1517) without public subnets. (This will be stopped with another error, but...)
Closes#28593.
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Copy file name to clipboardExpand all lines: packages/@aws-cdk-testing/framework-integ/test/aws-ec2/test/integ.reserved-public-subnet.js.snapshot/asset.4554b47be6f57b68c6c7a7391dcc73894866d2377fe174883351e7639097f292/__entrypoint__.js
Copy file name to clipboardExpand all lines: packages/@aws-cdk-testing/framework-integ/test/aws-ec2/test/integ.reserved-public-subnet.js.snapshot/asset.4554b47be6f57b68c6c7a7391dcc73894866d2377fe174883351e7639097f292/index.js
Copy file name to clipboardExpand all lines: packages/@aws-cdk-testing/framework-integ/test/aws-ec2/test/integ.reserved-public-subnet.js.snapshot/aws-cdk-ec2-vpc-reserved-public-subnet.assets.json
Copy file name to clipboardExpand all lines: packages/@aws-cdk-testing/framework-integ/test/aws-ec2/test/integ.reserved-public-subnet.js.snapshot/cdk.out
Copy file name to clipboardExpand all lines: packages/@aws-cdk-testing/framework-integ/test/aws-ec2/test/integ.reserved-public-subnet.js.snapshot/integ.json
Copy file name to clipboardExpand all lines: packages/@aws-cdk-testing/framework-integ/test/aws-ec2/test/integ.reserved-public-subnet.js.snapshot/integawscdkec2vpcreservedpublicsubnetDefaultTestDeployAssert469B3DFB.assets.json
Copy file name to clipboardExpand all lines: packages/@aws-cdk-testing/framework-integ/test/aws-ec2/test/integ.reserved-public-subnet.js.snapshot/integawscdkec2vpcreservedpublicsubnetDefaultTestDeployAssert469B3DFB.template.json
0 commit comments