provider/aws: Propagate errors from DetachVolume

This commit is contained in:
David Tolnay 2016-08-25 14:46:46 -04:00
parent ab5b463923
commit b09e042bf5
1 changed files with 4 additions and 0 deletions

View File

@ -161,6 +161,10 @@ func resourceAwsVolumeAttachmentDelete(d *schema.ResourceData, meta interface{})
}
_, err := conn.DetachVolume(opts)
if err != nil {
return fmt.Errorf("Failed to detach Volume (%s) from Instance (%s): %s",
vID, iID, err)
}
stateConf := &resource.StateChangeConf{
Pending: []string{"detaching"},
Target: []string{"detached"},