Skip to content

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 (#11)
  • Loading branch information
ekristen authored Mar 21, 2022
1 parent 01c54b0 commit 710458f
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 710458f

Please sign in to comment.