diff --git a/builder/amazonebs/step_create_ami.go b/builder/amazonebs/step_create_ami.go index f088e8fc6..ae470cb61 100644 --- a/builder/amazonebs/step_create_ami.go +++ b/builder/amazonebs/step_create_ami.go @@ -29,7 +29,11 @@ func (s *stepCreateAMI) Run(state map[string]interface{}) multistep.StepAction { strconv.FormatInt(time.Now().UTC().Unix(), 10), } - t := template.Must(template.New("ami").Parse(config.AMIName)) + t, err := template.New("ami").Parse(config.AMIName) + if err != nil { + ui.Error(err.Error()) + return multistep.ActionHalt + } t.Execute(amiNameBuf, tData) amiName := amiNameBuf.String()