Skip to content

Commit

Permalink
Remove owned VPCEs when deleting VPC.
Browse files Browse the repository at this point in the history
  • Loading branch information
s3rj1k committed Oct 28, 2024
1 parent 1416be7 commit 379006c
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions pkg/cloud/services/network/vpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,17 +276,8 @@ func (s *Service) deleteVPCEndpoints() error {
return nil
}

// Gather all services that might have been enabled.
services := sets.New[string]()
if s.scope.Bucket() != nil {
services.Insert(fmt.Sprintf("com.amazonaws.%s.s3", s.scope.Region()))
}
if services.Len() == 0 {
return nil
}

// Get all existing endpoints.
endpoints, err := s.describeVPCEndpoints()
endpoints, err := s.describeVPCEndpoints(filter.EC2.Cluster(s.scope.Name()))
if err != nil {
return errors.Wrap(err, "failed to describe vpc endpoints")
}
Expand Down

0 comments on commit 379006c

Please sign in to comment.