Skip to content

Commit 6bc3947

Browse files
committed
add regexp format validation to InstanceType param
This param now supports 1-4 instance types, provided they're separated by commands. That's not as obvious as I'd like it to be, so this adds a more descriptive error if we've failed to explain ourselves well enough and a user gets the format wrong.
1 parent 2551859 commit 6bc3947

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

templates/aws-stack.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,8 @@ Parameters:
208208
Type: String
209209
Default: t3.large
210210
MinLength: 1
211+
AllowedPattern: "^[^,]+(,[^,]*){0,3}$"
212+
ConstraintDescription: "must contain 1-4 instance types separated by commas"
211213

212214
MaxSize:
213215
Description: Maximum number of instances

0 commit comments

Comments
 (0)