From 620530c4ee1aa0ae9b16ec2943549963a49c0306 Mon Sep 17 00:00:00 2001 From: Steve Pulec Date: Thu, 31 May 2018 22:07:13 -0400 Subject: [PATCH] Fix security group egress rule outout. Closes #1612 --- moto/ec2/models.py | 2 +- moto/ec2/responses/security_groups.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/moto/ec2/models.py b/moto/ec2/models.py index 674e0bdd..4e26f0f6 100755 --- a/moto/ec2/models.py +++ b/moto/ec2/models.py @@ -1324,7 +1324,7 @@ class SecurityGroup(TaggedEC2Resource): self.name = name self.description = description self.ingress_rules = [] - self.egress_rules = [SecurityRule(-1, -1, -1, ['0.0.0.0/0'], [])] + self.egress_rules = [SecurityRule(-1, None, None, ['0.0.0.0/0'], [])] self.enis = {} self.vpc_id = vpc_id self.owner_id = "123456789012" diff --git a/moto/ec2/responses/security_groups.py b/moto/ec2/responses/security_groups.py index 9118c01b..0009ff13 100644 --- a/moto/ec2/responses/security_groups.py +++ b/moto/ec2/responses/security_groups.py @@ -179,8 +179,12 @@ DESCRIBE_SECURITY_GROUPS_RESPONSE = """