provider/aws: Avoid crash when EgressOnly IGW disappears (#14929)

This commit is contained in:
Radek Simko 2017-05-30 20:40:54 +01:00 committed by GitHub
parent 5d33023d99
commit b802897cea
1 changed files with 3 additions and 0 deletions

View File

@ -74,6 +74,9 @@ func EIGWStateRefreshFunc(conn *ec2.EC2, id string) resource.StateRefreshFunc {
return nil, "", err
}
}
if len(resp.EgressOnlyInternetGateways) < 1 {
resp = nil
}
if resp == nil {
// Sometimes AWS just has consistency issues and doesn't see