does not handle missing security Groups
Opened this issue · 0 comments
When VPCs are peered is it possible to reference remote security groups as a source in a rule.
then a peered VPCs is disconnected the reference to the remote security groups remains (till someone cleans it up).
aws-visualizer can not handle this condition
from a security group:
aws-visualizer will fail looking up sg-1abc809
"UserIdGroupPairs": [
{
"UserId": "1234566955519",
"GroupId": "sg-12345e5"
},
{
"VpcId": "vpc-1234595",
"GroupId": "sg-72d51809",
"PeeringStatus": "deleted"
},
INFO: graphing default dependencies
Traceback (most recent call last):
File "/usr/local/bin/aws-dot", line 11, in
load_entry_point('aws-visualizer==0.1.0', 'console_scripts', 'aws-dot')()
File "/usr/local/lib/python2.7/site-packages/aws_visualizer/dot/graph_region.py", line 571, in main
visualizer.print_security_group_tables()
File "/usr/local/lib/python2.7/site-packages/aws_visualizer/dot/graph_region.py", line 512, in print_security_group_tables
self.load_security_table_of_vpc(vpc['VpcId'])
File "/usr/local/lib/python2.7/site-packages/aws_visualizer/dot/graph_region.py", line 371, in load_security_table_of_vpc
self._add_security_group_to_table(instance, group)
File "/usr/local/lib/python2.7/site-packages/aws_visualizer/dot/graph_region.py", line 351, in _add_security_group_to_table
'GroupId'])
File "/usr/local/lib/python2.7/site-packages/aws_visualizer/dot/graph_region.py", line 224, in get_security_group_by_id
assert False, "No security group with id %s was found." % id
AssertionError: No security group with id sg-72d51809 was found.
INFO: graphing with subnets
^[Traceback (most recent call last):
File "/usr/local/bin/aws-dot", line 11, in
load_entry_point('aws-visualizer==0.1.0', 'console_scripts', 'aws-dot')()
File "/usr/local/lib/python2.7/site-packages/aws_visualizer/dot/graph_region.py", line 571, in main
visualizer.print_security_group_tables()
File "/usr/local/lib/python2.7/site-packages/aws_visualizer/dot/graph_region.py", line 512, in print_security_group_tables
self.load_security_table_of_vpc(vpc['VpcId'])
File "/usr/local/lib/python2.7/site-packages/aws_visualizer/dot/graph_region.py", line 371, in load_security_table_of_vpc
self._add_security_group_to_table(instance, group)
File "/usr/local/lib/python2.7/site-packages/aws_visualizer/dot/graph_region.py", line 351, in _add_security_group_to_table
'GroupId'])
File "/usr/local/lib/python2.7/site-packages/aws_visualizer/dot/graph_region.py", line 224, in get_security_group_by_id
assert False, "No security group with id %s was found." % id
AssertionError: No security group with id sg-72d51809 was found.
INFO: graphing with security groups
Traceback (most recent call last):
File "/usr/local/bin/aws-dot", line 11, in
load_entry_point('aws-visualizer==0.1.0', 'console_scripts', 'aws-dot')()
File "/usr/local/lib/python2.7/site-packages/aws_visualizer/dot/graph_region.py", line 571, in main
visualizer.print_security_group_tables()
File "/usr/local/lib/python2.7/site-packages/aws_visualizer/dot/graph_region.py", line 512, in print_security_group_tables
self.load_security_table_of_vpc(vpc['VpcId'])
File "/usr/local/lib/python2.7/site-packages/aws_visualizer/dot/graph_region.py", line 371, in load_security_table_of_vpc
self._add_security_group_to_table(instance, group)
File "/usr/local/lib/python2.7/site-packages/aws_visualizer/dot/graph_region.py", line 351, in _add_security_group_to_table
'GroupId'])
File "/usr/local/lib/python2.7/site-packages/aws_visualizer/dot/graph_region.py", line 224, in get_security_group_by_id
assert False, "No security group with id %s was found." % id
AssertionError: No security group with id sg-72d51809 was found.