diff --git a/builder/azure/chroot/step_create_new_disk.go b/builder/azure/chroot/step_create_new_disk.go index cf033ccf0..be3631e05 100644 --- a/builder/azure/chroot/step_create_new_disk.go +++ b/builder/azure/chroot/step_create_new_disk.go @@ -95,6 +95,9 @@ func (s StepCreateNewDisk) Cleanup(state multistep.StateBag) { ui.Say(fmt.Sprintf("Waiting for disk %q detach to complete", diskResourceID)) err := NewDiskAttacher(azcli).WaitForDetach(context.Background(), diskResourceID) + if err != nil { + ui.Error(fmt.Sprintf("error detaching disk %q: %s", diskResourceID, err)) + } ui.Say(fmt.Sprintf("Deleting disk %q", diskResourceID))