Merge pull request #3789 from jeremy-asher/amazon-ebs-delete-volumes-on-failure
clean up EBS volumes on failure
This commit is contained in:
commit
c273bd6beb
|
@ -30,12 +30,6 @@ func (s *stepCleanupVolumes) Cleanup(state multistep.StateBag) {
|
||||||
instance = instanceRaw.(*ec2.Instance)
|
instance = instanceRaw.(*ec2.Instance)
|
||||||
}
|
}
|
||||||
ui := state.Get("ui").(packer.Ui)
|
ui := state.Get("ui").(packer.Ui)
|
||||||
amisRaw := state.Get("amis")
|
|
||||||
if amisRaw == nil {
|
|
||||||
ui.Say("No AMIs to cleanup")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if instance == nil {
|
if instance == nil {
|
||||||
ui.Say("No volumes to clean up, skipping")
|
ui.Say("No volumes to clean up, skipping")
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue