mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 06:20:24 -05:00
* feat(ec2): support Dedicated Hosts (AllocateHosts, DescribeHosts, ModifyHosts, ReleaseHosts) terraform's aws_ec2_host failed at create with "Operation AllocateHosts is not supported". Add the four host actions following the Capacity Reservation pattern: region-scoped store, dedicated-host tags through TagSpecification and CreateTags, released hosts kept in DescribeHosts with state "released", and unknown ids as InvalidHostID.NotFound on describe. ModifyHosts and ReleaseHosts answer per host, putting an unknown, released or (on release) occupied host in the unsuccessful set rather than failing the call. RunInstances now honours Placement.HostId and Placement.Tenancy: the host must exist, tenancy defaults to "host", the zone defaults to the host's, and DescribeInstances reports placement.hostId. DescribeHosts lists the instances placed on each host. * fix(ec2): default AllocateHosts AutoPlacement to off and drop the non-AWS host-recovery filter AWS documents AutoPlacement as defaulting to off; the host record defaulted it to on. host-recovery is not a DescribeHosts filter in the EC2 API, so it is no longer matched. * fix(ec2): validate Dedicated Host zone, settings and launch placement, serialise release against launch RunInstances now rejects a host placement whose zone, tenancy or instance type contradicts the host, re-checked under a lock shared with ModifyHosts and ReleaseHosts. AllocateHosts rejects unknown zones; on/off host settings are validated on allocate and modify. The hosts store is final again, braces and the Consumer import follow AGENTS.md, and the RunInstances mock matcher in Ec2RunInstancesPublicIpParamTest gains the two host parameters. * test(ec2): pin exact host placement error codes and the in-lock host re-check * fix(ec2): validate AllocateHosts zone against modelled zones, import classes * style(ec2): fix import order and hostLock indentation, match AWS occupied-host message * style(ec2): put java.util.Arrays after the non-java imports in the dedicated host test * style(ec2): brace the host tag update and host tag lookup conditionals