fix(autoscaling): full Update field set, Describe filters + pagination, dup-name guard#1976
Merged
Conversation
…ters + pagination, duplicate-name guard - UpdateAutoScalingGroup now persists every mutable field DescribeAutoScalingGroups echoes back (DefaultCooldown, HealthCheckGracePeriod, VPCZoneIdentifier, AvailabilityZones, NewInstancesProtectedFromScaleIn, ServiceLinkedRoleARN, TargetGroupARNs, LaunchTemplate/LaunchConfiguration swap). Previously only Min/Max/Desired/LC/HealthCheckType were applied, so Terraform changes to the rest were accepted with 200 then silently dropped -> perpetual diff / "provider produced inconsistent result after apply". - DescribeAutoScalingGroups honors tag Filters (tag:<key>, tag-key, tag-value, auto-scaling-group); DescribeTags honors auto-scaling-group/key/value/ propagate-at-launch Filters instead of returning every group's tags (which caused tag bleed across resources for aws_autoscaling_group_tag). - All Describe* ops paginate: MaxRecords clamped to the AWS cap, NextToken emitted on truncation and resumed (offset token). - CreateAutoScalingGroup rejects a duplicate name with AlreadyExists instead of overwriting (which orphaned the prior group's launched instances). Adds unit tests for each.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Cycle-4 bug-hunt Tier-1 cluster for the EC2 Auto Scaling service (findings 1.1, 1.9, 1.15, 4.5).
DescribeAutoScalingGroupsechoes back (DefaultCooldown, HealthCheckGracePeriod, VPCZoneIdentifier, AvailabilityZones, NewInstancesProtectedFromScaleIn, ServiceLinkedRoleARN, TargetGroupARNs, LaunchTemplate↔LaunchConfiguration swap). Previously only Min/Max/Desired/LC/HealthCheckType applied → Terraform changes to anything else returned 200 then silently dropped → perpetual diff / "provider produced inconsistent result after apply".Filters(tag:/tag-key/tag-value/auto-scaling-group, and key/value/propagate-at-launch for tags). DescribeTags previously returned every group's tags → tag bleed acrossaws_autoscaling_group_tagresources.AlreadyExistsinstead of overwriting (which orphaned the prior group's launched instances).Test plan
cargo nextest run -p fakecloud-autoscaling7 pass.cargo clippy -p fakecloud-autoscaling --all-targets -- -D warningsclean.Surface
Behavior fix within an existing service; no new public API/SDK surface.
Summary by cubic
Fixes ASG drift and read inconsistencies: updates now persist all mutable fields, Describe APIs support filters and pagination, and duplicate names are rejected. This removes Terraform perpetual diffs and prevents tag bleed.
Written for commit e5741b0. Summary will update on new commits.