Skip to content

Commit 9d2ea2a

Browse files
author
Elad Ben-Israel
authored
fix(cdk): Fn.cidr should return a list and not a string (#2678)
CloudFormation's Fn::CIDR returns a list of CIDR blocks and not a string. So we need to use a listified token instead of a string. Fixes #2671
1 parent 88c4199 commit 9d2ea2a

File tree

1 file changed

+2
-2
lines changed
  • packages/@aws-cdk/cdk/lib

1 file changed

+2
-2
lines changed

packages/@aws-cdk/cdk/lib/fn.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ export class Fn {
112112
* @param sizeMask The digit covered in the subnet.
113113
* @returns a token represented as a string
114114
*/
115-
public static cidr(ipBlock: string, count: number, sizeMask?: string): string {
116-
return new FnCidr(ipBlock, count, sizeMask).toString();
115+
public static cidr(ipBlock: string, count: number, sizeMask?: string): string[] {
116+
return new FnCidr(ipBlock, count, sizeMask).toList();
117117
}
118118

119119
/**

0 commit comments

Comments
 (0)