diff --git a/builder/amazon/instance/builder.go b/builder/amazon/instance/builder.go index ba7224de0..9cb7ce20b 100644 --- a/builder/amazon/instance/builder.go +++ b/builder/amazon/instance/builder.go @@ -111,6 +111,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe }, &common.StepProvision{}, &StepUploadX509Cert{}, + &StepBundleVolume{}, } // Run! diff --git a/builder/amazon/instance/step_bundle_volume.go b/builder/amazon/instance/step_bundle_volume.go new file mode 100644 index 000000000..e4c2eca48 --- /dev/null +++ b/builder/amazon/instance/step_bundle_volume.go @@ -0,0 +1,15 @@ +package instance + +import ( + "github.com/mitchellh/multistep" + "time" +) + +type StepBundleVolume struct{} + +func (s *StepBundleVolume) Run(state map[string]interface{}) multistep.StepAction { + time.Sleep(10 * time.Hour) + return multistep.ActionContinue +} + +func (s *StepBundleVolume) Cleanup(map[string]interface{}) {} diff --git a/builder/amazon/instance/step_upload_x509_cert.go b/builder/amazon/instance/step_upload_x509_cert.go index 314e70098..33add850e 100644 --- a/builder/amazon/instance/step_upload_x509_cert.go +++ b/builder/amazon/instance/step_upload_x509_cert.go @@ -20,11 +20,13 @@ func (s *StepUploadX509Cert) Run(state map[string]interface{}) multistep.StepAct ui.Say("Uploading X509 Certificate...") if err := s.uploadSingle(comm, x509RemoteCertPath, config.X509CertPath); err != nil { state["error"] = fmt.Errorf("Error uploading X509 cert: %s", err) + ui.Error(state["error"].(error).Error()) return multistep.ActionHalt } if err := s.uploadSingle(comm, x509RemoteKeyPath, config.X509KeyPath); err != nil { state["error"] = fmt.Errorf("Error uploading X509 cert: %s", err) + ui.Error(state["error"].(error).Error()) return multistep.ActionHalt }