Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
fix: default security group deletion, should not proceed if groupIds …
Browse files Browse the repository at this point in the history
…is 0 (#766)
  • Loading branch information
ekristen authored Apr 5, 2022
1 parent 850f358 commit a8679f5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions resources/ec2-default-security-group-rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ func ListEC2SecurityGroupRules(sess *session.Session) ([]Resource, error) {
return nil, err
}

if len(groupIds) == 0 {
return resources, nil
}

sgRuleFilters := []*ec2.Filter{
{
Name: aws.String("group-id"),
Expand Down

0 comments on commit a8679f5

Please sign in to comment.