Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provider/aws: Fix issue in upgrading AutoScaling Policy #6440

Merged
merged 2 commits into from
May 5, 2016

Conversation

catsby
Copy link
Contributor

@catsby catsby commented May 2, 2016

Fixes an issue introduced with the addition of min_adjustment_magnitude and #4277 deprecation of min_adjustment_step. The upgrade path of swapping one for the other results in a reoccurring plan due to how we were handling zero values with GetOk (explained #6408 (comment)).

This PR addresses the issue by setting min_adjustment_step to 0 if min_adjustment_magnitude is found. The upgrade plan should be silent now; using min_adjustment_step still results in the depreciation warning, min_adjustment_magnitude corrects the plan and returns no diffs.

Unfortunately the API will set the MinAdjustmentMagnitude and MinAdjustmentStep to be equal, so setting MinAdjustmentStep will result in a MinAdjustmentMagnitude value. Users will need to make this config swap, but with this PR the plan will be silent afterwards.

Fixes #6408

@stack72
Copy link
Contributor

stack72 commented May 3, 2016

Nice fix - LGTM! I presume we need to put this in the release notes?

@catsby
Copy link
Contributor Author

catsby commented May 3, 2016

@stack72 we'll add it to the release notes yeah... unfortunately it's "deprecated so you have to use this new thing now" instead of "hey you should use this new thing eventually"

@phinze
Copy link
Contributor

phinze commented May 5, 2016

LGTM!

@catsby catsby merged commit 068f6f6 into master May 5, 2016
@catsby catsby deleted the b-aws-asg-min-policy branch May 5, 2016 15:17
bigkraig pushed a commit to ticketmaster/terraform that referenced this pull request May 5, 2016
* provider/aws: Fix issue in upgrading AutoScaling Policy min_adjustment_steps

- Update depreciation message on min_adjustment_step
cristicalin pushed a commit to cristicalin/terraform that referenced this pull request May 24, 2016
* provider/aws: Fix issue in upgrading AutoScaling Policy min_adjustment_steps

- Update depreciation message on min_adjustment_step
@ghost
Copy link

ghost commented Apr 26, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants