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