fix(ec2): apply cidr-block filter in DescribeSubnets (#1864)

* fix(ec2): apply cidr-block filter in DescribeSubnets
DescribeSubnets ignored Name=cidr-block and returned all subnets
in the VPC. Match AWS aliases cidr-block, cidrBlock, and cidr.
Fixes #1643

* test(ec2): set describeSubnetsByCidrBlockFilter Order to 23
This commit is contained in:
Leandro-ft authored and GitHub committed 2026-07-28 21:24:01 -05:00
1 parent aa4eee6e0c
commit 8f3597c205
2 files changed
+52

No files matched your search

@@ -2708,6 +2708,7 @@ public class Ec2Service implements ContainerTeardown {
case "vpc-id" -> matchesValue(values, subnet.getVpcId());
case "state" -> matchesValue(values, subnet.getState());
case "availabilityZone", "availability-zone" -> matchesValue(values, subnet.getAvailabilityZone());
case "cidr-block", "cidrBlock", "cidr" -> matchesValue(values, subnet.getCidrBlock());
default -> true;
};
}