Files
floci/src/main/java/io/github/hectorvent
lex00 26ae4ef78a fix(ec2): honour documented Describe* filters and stop ENIs inheriting instance tags (#2747)
* fix(ec2): honour documented Describe* filters and stop ENIs inheriting instance tags

Six Describe* calls silently ignored documented filter inputs, each an
instance of the same bug shape: an unhandled filter name fell through
matchesFilter's default -> true arm (or, for DescribeAddresses, the
filters parameter was never applied at all), so a filtered call returned
the same unfiltered list as no filter - and Volumes[0]/Vpcs[0] reads
depended on iteration order instead of the filter.

- DescribeSecurityGroups: description
- DescribeVpcs: cidr-block alias for cidr (verified against live AWS
  2026-08-25: accepted, primary CIDR only)
- DescribeVpcEndpoints: vpc-endpoint-state (renamed from the
  undocumented "state" key; no evidence AWS accepts "state")
- DescribeVolumes: attachment.instance-id/device/status/
  delete-on-termination
- DescribeInstances: image-id
- DescribeAddresses: all documented filters this store can back, plus
  the generic tag: family

Also stops DescribeNetworkInterfaces copying the attached instance's
tags into an interface's tagSet: an ENI's tags are its own, and AWS
tags launch-created interfaces only via a RunInstances TagSpecification
with ResourceType=network-interface, which RunInstances now honours.

* fix(ec2): filter addresses on refreshed association state and classify eni- ids in DescribeTags

DescribeAddresses now re-resolves an associated address before the filter
pass, so a public-ip filter is judged against the address the response
carries rather than the one persisted before an instance restart. And
inferResourceType learns the eni- prefix, so a launch-time network-interface
tag shows up under DescribeTags resource-type=network-interface instead of
being classified unknown and dropped.

* test(ec2): pin refresh-before-filter for DescribeAddresses and the ENI tag path through DescribeTags

A public-ip filter now has a regression test across a simulated container
restart: the current bridge IP must match and the pre-restart IP must not,
which fails if filtering ever runs before the association refresh again.
The launch-time ENI TagSpecification test asserts DescribeTags returns the
tag under the interface's own resourceId with resource-type
network-interface, exercising the full RunInstances path rather than the
classification helper alone.
2026-08-30 18:47:38 -04:00
..