From 547d686a9a269707add89cd75be6ca86bbf3df87 Mon Sep 17 00:00:00 2001 From: nigel_li Date: Tue, 21 Jul 2020 15:27:31 +0800 Subject: [PATCH] Allow List param to have MinValue, MaxValue AWS CloudFormation validates the List parameter value as numbers. See: - https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html --- troposphere/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/troposphere/__init__.py b/troposphere/__init__.py index 399e6f9d9..6a180be4e 100644 --- a/troposphere/__init__.py +++ b/troposphere/__init__.py @@ -905,7 +905,8 @@ def check_type(t, v): if p in self.properties: raise ValueError("%s can only be used with parameters of " "the String type." % p) - if self.properties['Type'] != 'Number': + if (self.properties['Type'] != 'Number' and + self.properties['Type'] != 'List'): for p in self.NUMBER_PROPERTIES: if p in self.properties: raise ValueError("%s can only be used with parameters of "