Merge pull request #8479 from dtolnay/detach

provider/aws: Propagate errors from DetachVolume
This commit is contained in:
Mitchell Hashimoto 2016-08-25 22:21:46 -07:00 committed by GitHub
commit 6b124a4760
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"},