Ignore "unknown instance" error when rm instance
Fixes #4112 Signed-off-by: Jacob Parry <jacob@jacobparry.ca>
This commit is contained in:
@@ -950,6 +950,11 @@ func (d *Driver) terminate() error {
|
||||
_, err := d.getClient().TerminateInstances(&ec2.TerminateInstancesInput{
|
||||
InstanceIds: []*string{&d.InstanceId},
|
||||
})
|
||||
|
||||
if strings.HasPrefix(err.Error(), "unknown instance") {
|
||||
return nil
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to terminate instance: %s", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user