mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 14:30:28 -05:00
* fix(autoscaling): tag member instances with aws:autoscaling:groupName Auto Scaling adds the aws:autoscaling:groupName tag, valued with the group's name, to every instance it launches or attaches, and removes it when the instance is detached. Floci never set it, so filtering EC2 instances on tag:aws:autoscaling:groupName found none of a group's members. - Launches add the tag after the launch template's instance tags and the group's PropagateAtLaunch tags, so the group's actual name wins over any stored tag with that key. - AttachInstances applies the group's PropagateAtLaunch tags and the group-name tag to the instances EC2 holds. It refuses the whole batch with ValidationError when an instance already belongs to a group, so one group cannot overwrite another group's tag, and an instance named twice in one request joins once. An ID EC2 has no instance for still joins, as before, but gets no tags, which would otherwise outlive it in EC2's DescribeTags. - DetachInstances removes only the group-name tag, and only where it still names that group. It goes through a new service-owned EC2 tag delete, because the public DeleteTags refuses aws: keys. Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com> * test(compat): cover the Auto Scaling group-name tag through the SDK Drives launch, attach, a refused second attach and detach with the AWS SDK for Java and checks the instance tags EC2 reports after each step. Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com> --------- Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>