Skip to content

Commit

Permalink
aws - security-group - references ingress/egress rules bug fix (cloud…
Browse files Browse the repository at this point in the history
  • Loading branch information
kylejohnson514 authored Aug 5, 2021
1 parent a224d27 commit 232de1b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion c7n/resources/vpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1211,7 +1211,7 @@ def process_sg_references(self, perm, owner_id):
if not sg_perm:
return False

sg_group_ids = [p['GroupId'] for p in sg_perm if p['UserId'] == owner_id]
sg_group_ids = [p['GroupId'] for p in sg_perm if p.get('UserId', '') == owner_id]
sg_resources = self.manager.get_resources(sg_group_ids)
vf = ValueFilter(sg_refs, self.manager)
vf.annotate = False
Expand Down
2 changes: 0 additions & 2 deletions tests/test_vpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2196,7 +2196,6 @@ def test_security_group_reference_ingress_filter(self):
session_factory=factory,
)
resources = p.run()

self.assertEqual(len(resources), 1)

def test_security_group_reference_egress_filter(self):
Expand All @@ -2219,7 +2218,6 @@ def test_security_group_reference_egress_filter(self):
session_factory=factory,
)
resources = p.run()

self.assertEqual(len(resources), 1)

def test_egress_ipv6(self):
Expand Down

0 comments on commit 232de1b

Please sign in to comment.