When I'm creating CloudFormation template with the use of interactive Parameters
, I can define the type of List<> to be able to select multiple values, for example:
SubnetIds:
Type: List<AWS::EC2::Subnet::Id>
Description: Select multiple subnets from selected VPC.
Default: "????"
or:
SecurityGroups:
Type: List<AWS::EC2::SecurityGroup::Id>
Description: Select security groups.
Default: "???"
The question is how do I pre-set default
value with multiple selections? if default
takes only the string instead of a list, and string with commas between multiple values also doesn't help
Any ideas? please, hint me
I recently run in the same issue. The answer is simple - there should be no spaces in your comma-separated list. So it would look like:
SecurityGroups:
Type: List<AWS::EC2::SecurityGroup::Id>
Description: Select security groups.
Default: "sg-11111111,sg-22222222"
And this way the values would be preselected in your template.
P.S. Do not try CommaDelimitedList or so - it won't work in the way you want. The string values would be selected, but not the actual security groups.
Source: https://forums.aws.amazon.com/thread.jspa?threadID=165144
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With