Ignore missing ENI attachment when trying to detach (#7185)
This commit is contained in:
parent
f5e882eca6
commit
3c702f2d75
|
@ -196,8 +196,10 @@ func resourceAwsNetworkInterfaceDetach(oa *schema.Set, meta interface{}, eniId s
|
||||||
conn := meta.(*AWSClient).ec2conn
|
conn := meta.(*AWSClient).ec2conn
|
||||||
_, detach_err := conn.DetachNetworkInterface(detach_request)
|
_, detach_err := conn.DetachNetworkInterface(detach_request)
|
||||||
if detach_err != nil {
|
if detach_err != nil {
|
||||||
|
if awsErr, _ := detach_err.(awserr.Error); awsErr.Code() != "InvalidAttachmentID.NotFound" {
|
||||||
return fmt.Errorf("Error detaching ENI: %s", detach_err)
|
return fmt.Errorf("Error detaching ENI: %s", detach_err)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
log.Printf("[DEBUG] Waiting for ENI (%s) to become dettached", eniId)
|
log.Printf("[DEBUG] Waiting for ENI (%s) to become dettached", eniId)
|
||||||
stateConf := &resource.StateChangeConf{
|
stateConf := &resource.StateChangeConf{
|
||||||
|
|
Loading…
Reference in New Issue