Add printing of launch template id

pull/10456/head
Narthana Epa 5 years ago
parent f7e68f1d71
commit f7588a3737
No known key found for this signature in database
GPG Key ID: 7ABC460881544B69

@ -273,7 +273,7 @@ func (s *StepRunSpotInstance) Run(ctx context.Context, state multistep.StateBag)
}
// Tell EC2 to create the template
_, err = ec2conn.CreateLaunchTemplate(launchTemplate)
createLaunchTemplateOutput, err := ec2conn.CreateLaunchTemplate(launchTemplate)
if err != nil {
err := fmt.Errorf("Error creating launch template for spot instance: %s", err)
state.Put("error", err)
@ -281,6 +281,9 @@ func (s *StepRunSpotInstance) Run(ctx context.Context, state multistep.StateBag)
return multistep.ActionHalt
}
launchTemplateId := createLaunchTemplateOutput.LaunchTemplate.LaunchTemplateId
ui.Message(fmt.Sprintf("Created Spot Fleet launch template: %s", *launchTemplateId))
// Add overrides for each user-provided instance type
var overrides []*ec2.FleetLaunchTemplateOverridesRequest
for _, instanceType := range s.SpotInstanceTypes {

Loading…
Cancel
Save