mirror of
https://github.com/floci-io/floci.git
synced 2026-11-27 07:39:24 -05:00
* 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