Files
floci/src/main/java
Allen Sanborn 2a4f57321c fix(ec2): CreateNetworkInterface honours the PrivateIpAddresses entry marked Primary (#7031)
* fix(ec2): CreateNetworkInterface honours the PrivateIpAddresses entry marked Primary

The Terraform AWS provider sends private_ips as PrivateIpAddresses.N.PrivateIpAddress
plus Primary=true. The handler dropped the Primary flag, so the ENI got an
auto-allocated primary and the requested address became a secondary. The entry
marked Primary is now the primary (checked and reserved like PrivateIpAddress),
other entries are secondaries and are refused with InvalidIPAddress.InUse when
held. PrivateIpAddress together with a Primary entry is InvalidParameterCombination.

* test(ec2): cover duplicate Primary entries and secondaries equal to the primary in CreateNetworkInterface

* fix(ec2): check CreateNetworkInterface secondaries in canonical form before allocating the primary

A refused secondary no longer leaves the auto-assigned primary leased on the
VPC network, and a zero-padded secondary can no longer slip past the in-use
and duplicate checks or be stored padded.

* test(ec2): cover an auto-assigned primary that equals a requested secondary
2026-10-30 21:57:10 -04:00
..