Tech debt: ELB finders-on-listers#49057
Draft
ewbankkit wants to merge 14 commits into
Draft
Conversation
Adds support for the EC2 Auto Scaling instance lifecycle policy (instance_lifecycle_policy -> retention_triggers -> terminate_hook_abandon), including create, read, and update wiring, acceptance test, and documentation. Closes #48968
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
% make testacc TESTARGS='-run=TestAccAutoScalingGroup_basic\|TestAccAutoScalingGroup_instanceLifecyclePolicy' PKG=autoscaling make: Verifying source code with gofmt... ==> Checking that code complies with gofmt requirements... make: Validating schemas ok github.com/hashicorp/terraform-provider-aws/internal/provider/sdkv2 5.694s ok github.com/hashicorp/terraform-provider-aws/internal/provider/framework 5.721s make: Running acceptance tests on branch: 🌿 HEAD 🌿... TF_ACC=1 go1.26.5 test ./internal/service/autoscaling/... -v -count 1 -parallel 20 -run=TestAccAutoScalingGroup_basic\|TestAccAutoScalingGroup_instanceLifecyclePolicy -timeout 360m -vet=off -buildvcs=false 2026/07/17 14:33:35 Creating Terraform AWS Provider (SDKv2-style)... 2026/07/17 14:33:35 Initializing Terraform AWS Provider (SDKv2-style)... === RUN TestAccAutoScalingGroup_basic === PAUSE TestAccAutoScalingGroup_basic === RUN TestAccAutoScalingGroup_instanceLifecyclePolicy === PAUSE TestAccAutoScalingGroup_instanceLifecyclePolicy === CONT TestAccAutoScalingGroup_basic === CONT TestAccAutoScalingGroup_instanceLifecyclePolicy --- PASS: TestAccAutoScalingGroup_basic (104.44s) --- PASS: TestAccAutoScalingGroup_instanceLifecyclePolicy (170.39s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/autoscaling 176.119s
…ecycle_policy The API always returns a retention trigger (defaulting to 'terminate') and provides no way to clear the policy, so mark instance_lifecycle_policy as Optional + Computed to avoid a perpetual diff when the block is omitted or removed. Add acceptance test coverage for updating and removing the block, and document that removing the block retains the last applied value.
# Conflicts: # internal/service/autoscaling/group_test.go
…: You can't force delete this Auto Scaling group because the TerminateHookAbandon retention trigger is set to retain. Change the retention trigger to terminate and try again'.
Contributor
Community GuidelinesThis comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀 Voting for Prioritization
Pull Request Authors
|
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.
Rollback Plan
If a change needs to be reverted, we will publish an updated version of the library.
Changes to Security Controls
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.
Description
Extracted from #48973.
Relations
Relates #47691.
Output from Acceptance Testing