Skip to content

Commit

Permalink
Treat NatGatewaysNotFound error as already-deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
johngmyers committed May 3, 2020
1 parent 1620bf5 commit 7c5815c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/resources/aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -1324,6 +1324,10 @@ func FindNatGateways(cloud fi.Cloud, routeTables map[string]*resources.Resource,
}
response, err := c.EC2().DescribeNatGateways(request)
if err != nil {
if awsup.AWSErrorCode(err) == "NatGatewayNotFound" {
klog.V(2).Infof("Got NatGatewayNotFound describing NatGateways; will treat as already-deleted")
return nil, nil
}
return nil, fmt.Errorf("error from DescribeNatGateways: %v", err)
}

Expand Down

0 comments on commit 7c5815c

Please sign in to comment.