From b09e042bf5573b23d642873cf657c0c7b29c342c Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Thu, 25 Aug 2016 14:46:46 -0400 Subject: [PATCH] provider/aws: Propagate errors from DetachVolume --- builtin/providers/aws/resource_aws_volume_attachment.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/builtin/providers/aws/resource_aws_volume_attachment.go b/builtin/providers/aws/resource_aws_volume_attachment.go index 658f89765..74566700d 100644 --- a/builtin/providers/aws/resource_aws_volume_attachment.go +++ b/builtin/providers/aws/resource_aws_volume_attachment.go @@ -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"},