diff --git a/moto/ec2/models.py b/moto/ec2/models.py index 446561d33..cf45546fe 100644 --- a/moto/ec2/models.py +++ b/moto/ec2/models.py @@ -2597,6 +2597,7 @@ class NetworkAclAssociation(object): subnet_id, network_acl_id): self.ec2_backend = ec2_backend self.id = new_association_id + self.new_association_id = new_association_id self.subnet_id = subnet_id self.network_acl_id = network_acl_id super(NetworkAclAssociation, self).__init__() @@ -2609,10 +2610,12 @@ class NetworkAcl(TaggedEC2Resource): self.vpc_id = vpc_id self.network_acl_entries = [] self.associations = {} - self.default = default + self.default = 'true' if default is True else 'false' def get_filter_value(self, filter_name): - if filter_name == "vpc-id": + if filter_name == "default": + return self.default + elif filter_name == "vpc-id": return self.vpc_id elif filter_name == "association.network-acl-id": return self.id diff --git a/moto/ec2/responses/network_acls.py b/moto/ec2/responses/network_acls.py index 684bf6821..ac90021a8 100644 --- a/moto/ec2/responses/network_acls.py +++ b/moto/ec2/responses/network_acls.py @@ -96,7 +96,7 @@ DESCRIBE_NETWORK_ACL_RESPONSE = """ {{ network_acl.id }} {{ network_acl.vpc_id }} - true + {{ network_acl.default }} {% for entry in network_acl.network_acl_entries %}