2 Answers
- Newest
- Most votes
- Most comments
1
You can try this way, but I think there is more elegant solution:
AWSTemplateFormatVersion: "2010-09-09"
Transform: AWS::LanguageExtensions
Parameters:
InstanceList:
Type: CommaDelimitedList
Resources:
Fn::ForEach::Instances:
- InstanceLogicalId
- !Ref InstanceList
- ${InstanceLogicalId}:
Type: AWS::EC2::Instance
Properties:
ImageId: ami-0ed752ea0f62749af
InstanceType: t2.micro
Then in a console just type the name of logical id, like:
instance1 - will create one instance
instance1, instance2, instance3 - will create three instances
0
You can also do this with Count -macro. There were some issues using parameters with Count attribute but based on comments those shound have been fixed.
Relevant content
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago