Files
floci/docs
Allen Sanborn 8dbcf6bf17 fix(ec2): read RunInstances security groups from the primary interface spec (#6964)
* fix(ec2): read RunInstances security groups from the primary interface spec

RunInstances read security groups only from the top-level
SecurityGroupId.N. With private_ip or associate_public_ip_address set,
Terraform's aws_instance sends them on the primary interface spec
(NetworkInterface.1.SecurityGroupId.N), so the instance landed in the
VPC's default group and the next plan wanted to replace it.

The interface spec's groups apply only when its DeviceIndex is 0 (another
index is a secondary interface), and a request carrying both shapes fails
with InvalidParameterCombination, as on AWS.

* test(ec2): match the capacity reservation argument RunInstances now passes

* test(ec2): fold the interface security group cases into Ec2RunInstancesPublicIpParamTest

Both classes tested what RunInstances takes from the interface spec with
the same handler setup, base params and runInstances stub; only the
captured argument differed. One forward() helper now runs the request and
captures both the security groups and the public-IP override, and the
separate class is gone.
2026-10-29 21:57:16 -04:00
..
2026-03-15 17:43:56 -05:00