Skip to content

Commit

Permalink
Merge pull request #7008 from justinsb/recognize_vpc_not_found
Browse files Browse the repository at this point in the history
VPC cleanup: recognize the error code for concurrent VPC deletion
  • Loading branch information
k8s-ci-robot committed May 16, 2019
2 parents 1725c1a + 49b40c9 commit fca8ccf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/resources/aws/vpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ func DeleteVPC(cloud fi.Cloud, r *resources.Resource) error {
}
_, err := c.EC2().DeleteVpc(request)
if err != nil {
if awsup.AWSErrorCode(err) == "InvalidVpcID.NotFound" {
// Concurrently deleted
return nil
}

if IsDependencyViolation(err) {
return err
}
Expand Down

0 comments on commit fca8ccf

Please sign in to comment.