Merge pull request #4120 from parryjacob/4112-allow-remove-unknown
Ignore more errors from EC2 API
This commit is contained in:
@@ -951,7 +951,8 @@ func (d *Driver) terminate() error {
|
||||
InstanceIds: []*string{&d.InstanceId},
|
||||
})
|
||||
|
||||
if strings.HasPrefix(err.Error(), "unknown instance") {
|
||||
if strings.HasPrefix(err.Error(), "unknown instance") ||
|
||||
strings.HasPrefix(err.Error(), "InvalidInstanceID.NotFound") {
|
||||
log.Warn("Remote instance does not exist, proceeding with removing local reference")
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user