Skip to content

Commit ba3258d

Browse files
authored
docs(ec2): clarify error message for vpc sizing error (#27550)
Subnet size must be minimum /28. This clarifies the error message. Closes #27479. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 1e360b6 commit ba3258d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/aws-cdk-lib/aws-ec2/lib/network-util.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55
export class InvalidCidrRangeError extends Error {
66
constructor(cidr: string) {
7-
super(cidr + ' is not a valid VPC CIDR range (must be between /16 and /28)');
7+
super(cidr + ' is not a valid VPC CIDR range. VPCs must be between /16 and /28 and the minimum subnet size is /28.');
88
// The following line is required for type checking of custom errors, and must be called right after super()
99
// https://stackoverflow.com/questions/31626231/custom-error-class-in-typescript
1010
Object.setPrototypeOf(this, InvalidCidrRangeError.prototype);

0 commit comments

Comments
 (0)