providers/aws: if terminated, no longer exists
This commit is contained in:
parent
1d724f3481
commit
1df3297601
|
@ -89,6 +89,12 @@ func resource_aws_instance_refresh(
|
|||
}
|
||||
|
||||
instance := &resp.Reservations[0].Instances[0]
|
||||
|
||||
// If the instance is terminated, then it is gone
|
||||
if instance.State.Name == "terminated" {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
return resource_aws_instance_update_state(s, instance)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue