From c9521b6c7cb9edb7cf24edeede546c3c046e92e3 Mon Sep 17 00:00:00 2001 From: Carter McKinnon Date: Sun, 26 Nov 2023 09:17:55 +0000 Subject: [PATCH] Only sweep detached ENIs --- kubetest2/internal/deployer/eksapi/infra.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/kubetest2/internal/deployer/eksapi/infra.go b/kubetest2/internal/deployer/eksapi/infra.go index 14abb13e6..0bee13d0d 100644 --- a/kubetest2/internal/deployer/eksapi/infra.go +++ b/kubetest2/internal/deployer/eksapi/infra.go @@ -163,6 +163,14 @@ func deleteLeakedENIs(clients *awsClients, resourceID string) error { Name: aws.String("vpc-id"), Values: []string{infra.vpc}, }, + { + Name: aws.String("attachment.status"), + Values: []string{"detached"}, + }, + { + Name: aws.String("interface-type"), + Values: []string{"interface"}, + }, }, }) deleted := 0