Skip to content

Commit c4acc54

Browse files
committed
Exclude terminated instances
1 parent e564978 commit c4acc54

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

gitpod-network-check/cmd/common.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ func cleanup(ctx context.Context, svc *ec2.Client, iamsvc *iam.Client) {
4444
Name: aws.String("tag:gitpod.io/network-check"),
4545
Values: []string{"true"},
4646
},
47+
{
48+
Name: aws.String("instance-state-name"),
49+
Values: []string{"pending", "running", "shutting-down", "stopping", "stopped"},
50+
},
4751
},
4852
})
4953
if err != nil {

0 commit comments

Comments
 (0)