From 9d2ea2a6cc6e012de40544cffad6cae556940e49 Mon Sep 17 00:00:00 2001 From: Elad Ben-Israel Date: Thu, 30 May 2019 02:09:21 +0300 Subject: [PATCH] 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 --- packages/@aws-cdk/cdk/lib/fn.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/@aws-cdk/cdk/lib/fn.ts b/packages/@aws-cdk/cdk/lib/fn.ts index f15c31f0255b9..1c4ab8f823350 100644 --- a/packages/@aws-cdk/cdk/lib/fn.ts +++ b/packages/@aws-cdk/cdk/lib/fn.ts @@ -112,8 +112,8 @@ export class Fn { * @param sizeMask The digit covered in the subnet. * @returns a token represented as a string */ - public static cidr(ipBlock: string, count: number, sizeMask?: string): string { - return new FnCidr(ipBlock, count, sizeMask).toString(); + public static cidr(ipBlock: string, count: number, sizeMask?: string): string[] { + return new FnCidr(ipBlock, count, sizeMask).toList(); } /**