Skip to content

Commit a0d8ae3

Browse files
Add launch template to cloudformation
1 parent 6ec2f9e commit a0d8ae3

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed

resources.template

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,16 @@ Mappings:
1010
local:
1111
Subnets: []
1212
preview:
13+
Image: 'ami-00fa9ca3dffffc050'
14+
Snapshot: 'snap-04d9283dd7b270dc8'
1315
Subnets:
1416
- AvailabilityZone: us-east-2a
1517
SubnetId: subnet-08fe76b5c6dc035d0
1618
- AvailabilityZone: us-east-2b
1719
SubnetId: subnet-0797a471ba5029682
1820
cardano-tom:
21+
Image: 'ami-07feb56dadb897a30'
22+
Snapshot: 'snap-047e50379c2d1fce9'
1923
Subnets:
2024
- AvailabilityZone: us-east-2a
2125
SubnetId: subnet-043cc56533b840171
@@ -168,6 +172,36 @@ Resources:
168172
Roles:
169173
- !Ref KinesisRole
170174

175+
SundaeSyncLaunchTemplate:
176+
Type: AWS::EC2::LaunchTemplate
177+
Properties:
178+
LaunchTemplateName: !Sub "${Env}-sundae-sync-v2-template"
179+
LaunchTemplateData:
180+
BlockDeviceMappings:
181+
- DeviceName: "/dev/xvda"
182+
Ebs:
183+
DeleteOnTermination: true
184+
Iops: 3000
185+
SnapshotId: !FindInMap [Env, !Ref Env, Snapshot]
186+
Throuthput: 125
187+
VolumeSize: 512
188+
VolumeType: "gp3"
189+
IamInstanceProfile:
190+
Name: !Ref KinesisRoleInstanceProfile
191+
ImageId: !FindInMap [Env, !Ref Env, Image]
192+
InstanceType: t2.small
193+
KeyName: pi
194+
PrivateDnsNameOptions:
195+
HostnameType: resource-name
196+
NetworkInterfaces:
197+
- DeviceIndex: 0
198+
AssociatePublicIpAddress: true
199+
TagSpecifications:
200+
ResourceType: "launch-template"
201+
Tags:
202+
- Key: sundae-labs:cost-allocation:Service
203+
Value: sundae-sync-v2
204+
171205
SundaeSyncInstances:
172206
Type: 'AWS::EC2::EC2Fleet'
173207
Properties:
@@ -183,6 +217,6 @@ Resources:
183217
DefaultTargetCapacityType: 'spot'
184218
LaunchTemplateConfigs:
185219
- LaunchTemplateSpecification:
186-
LaunchTemplateName: sundae-sync-v2-template
220+
LaunchTemplateName: !GetAtt SundaeSyncLaunchTemplate.Name
187221
Version: $Latest
188222
Overrides: !FindInMap [Env, !Ref Env, Subnets]

0 commit comments

Comments
 (0)