Skip to content

Commit

Permalink
VPC cleanup: recognize the error code for concurrent VPC deletion
Browse files Browse the repository at this point in the history
Hit this when I was cleaning up my VPCs manually.
  • Loading branch information
justinsb committed May 19, 2019
1 parent 0151919 commit fa82f2e
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 fa82f2e

Please sign in to comment.