Issue
I'm trying to enforce an allowed pattern with regex on my parameter, but when I try to build my stack, I get the following error message:
Template validation error: Template error: Parameter 'myParam' AllowedPattern must be on a parameter of type String
This is my Parameter definition:
"myParam": {
"Description": "this is my param",
"Type": "CommaDelimitedList",
"AllowedPattern": "\\+[0-9\\-\\ ]+",
"MinLength": "1"
}
Solution
I believe you can't do regex on CommaDelimitedList. Regex can only be applied on strings.
CommaDelimitedList – An array of literal strings that are separated by commas
Answered By - iCodeLikeImDrunk Answer Checked By - Timothy Miller (WPSolving Admin)