Files
floci/src/main/java/io
lex00 614166fe1f fix(ec2): reject a CreateSubnet whose CIDR overlaps an existing subnet (#3171)
* fix(ec2): reject a CreateSubnet whose CIDR overlaps an existing subnet

AWS refuses a subnet whose IPv4 CIDR overlaps another subnet's in the
same VPC with InvalidSubnet.Conflict. CreateSubnet has no idempotency
token, so this check is also what stops an SDK transport retry after a
lost response from recording a second subnet at the same CIDR.

Ported from lex00/floci#191.

* fix(ec2): hold the VPC lock across the subnet conflict scan and store

Two overlapping CreateSubnet requests in flight together could both pass
the scan before either subnet was stored, so the retry case the check
targets could still record a duplicate. The scan and the put now run
under the VPC's stripe lock, the way the other per-resource mutators do.
2026-09-07 09:27:23 -04:00
..