Output error causing ebs volume deletion failure

When an ebs volume fails to delete, Packer reports that there
was an error deleting the volume and the volume id. But it doesn't
give you the details of what that error is. This commit adds the
error reported back to the standard output.
This commit is contained in:
Richard Moore 2017-01-13 15:33:47 +00:00
parent f7a17d5a33
commit 9435fa62e3
1 changed files with 1 additions and 0 deletions

View File

@ -106,6 +106,7 @@ func (s *stepCleanupVolumes) Cleanup(state multistep.StateBag) {
_, err := ec2conn.DeleteVolume(&ec2.DeleteVolumeInput{VolumeId: aws.String(k)})
if err != nil {
ui.Say(fmt.Sprintf("Error deleting volume: %s", k))
ui.Say(fmt.Sprintf("The error is: %s", err))
}
}