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

Predictive autoscaling #19447

Merged
merged 9 commits into from
May 20, 2021
Merged

Predictive autoscaling #19447

merged 9 commits into from
May 20, 2021

Conversation

bill-rich
Copy link
Contributor

Add predictive autoscaling support to aws_autoscaling_policy.

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Output from acceptance testing:

==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSAutoscalingPolicy_ -timeout 180m
=== RUN   TestAccAWSAutoscalingPolicy_basic
=== PAUSE TestAccAWSAutoscalingPolicy_basic
=== RUN   TestAccAWSAutoscalingPolicy_predictiveScaling
=== PAUSE TestAccAWSAutoscalingPolicy_predictiveScaling
=== RUN   TestAccAWSAutoscalingPolicy_predictiveScalingRemoved
=== PAUSE TestAccAWSAutoscalingPolicy_predictiveScalingRemoved
=== RUN   TestAccAWSAutoscalingPolicy_predictiveScalingUpdated
=== PAUSE TestAccAWSAutoscalingPolicy_predictiveScalingUpdated
=== RUN   TestAccAWSAutoscalingPolicy_disappears
=== PAUSE TestAccAWSAutoscalingPolicy_disappears
=== RUN   TestAccAWSAutoscalingPolicy_SimpleScalingStepAdjustment
=== PAUSE TestAccAWSAutoscalingPolicy_SimpleScalingStepAdjustment
=== RUN   TestAccAWSAutoscalingPolicy_TargetTrack_Predefined
=== PAUSE TestAccAWSAutoscalingPolicy_TargetTrack_Predefined
=== RUN   TestAccAWSAutoscalingPolicy_TargetTrack_Custom
=== PAUSE TestAccAWSAutoscalingPolicy_TargetTrack_Custom
=== RUN   TestAccAWSAutoscalingPolicy_zerovalue
=== PAUSE TestAccAWSAutoscalingPolicy_zerovalue
=== CONT  TestAccAWSAutoscalingPolicy_basic
=== CONT  TestAccAWSAutoscalingPolicy_SimpleScalingStepAdjustment
=== CONT  TestAccAWSAutoscalingPolicy_TargetTrack_Custom
=== CONT  TestAccAWSAutoscalingPolicy_predictiveScaling
=== CONT  TestAccAWSAutoscalingPolicy_predictiveScalingUpdated
=== CONT  TestAccAWSAutoscalingPolicy_predictiveScalingRemoved
=== CONT  TestAccAWSAutoscalingPolicy_zerovalue
=== CONT  TestAccAWSAutoscalingPolicy_disappears
=== CONT  TestAccAWSAutoscalingPolicy_TargetTrack_Predefined
--- PASS: TestAccAWSAutoscalingPolicy_disappears (57.14s)
--- PASS: TestAccAWSAutoscalingPolicy_zerovalue (58.61s)
--- PASS: TestAccAWSAutoscalingPolicy_predictiveScaling (61.01s)
--- PASS: TestAccAWSAutoscalingPolicy_TargetTrack_Custom (62.98s)
--- PASS: TestAccAWSAutoscalingPolicy_TargetTrack_Predefined (63.81s)
--- PASS: TestAccAWSAutoscalingPolicy_SimpleScalingStepAdjustment (67.18s)
--- PASS: TestAccAWSAutoscalingPolicy_predictiveScalingUpdated (75.46s)
--- PASS: TestAccAWSAutoscalingPolicy_predictiveScalingRemoved (91.24s)
--- PASS: TestAccAWSAutoscalingPolicy_basic (103.44s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	103.495s

@bill-rich bill-rich requested a review from a team as a code owner May 19, 2021 22:57
@ghost ghost added size/XL Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. service/autoscaling Issues and PRs that pertain to the autoscaling service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels May 19, 2021
Copy link
Contributor

@gdavison gdavison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a couple issues where we could get tripped up by Terraform's behaviour of handling a zero-value the same as unset. The range for max_capacity_buffer also looks like it's been changed to 0-100

aws/resource_aws_autoscaling_policy.go Outdated Show resolved Hide resolved
aws/resource_aws_autoscaling_policy.go Outdated Show resolved Hide resolved
Copy link
Contributor

@gdavison gdavison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

Acceptance test results

--- PASS: TestAccAWSAutoscalingPolicy_SimpleScalingStepAdjustment (40.61s)
--- PASS: TestAccAWSAutoscalingPolicy_TargetTrack_Predefined (58.62s)
--- PASS: TestAccAWSAutoscalingPolicy_zerovalue (58.68s)
--- PASS: TestAccAWSAutoscalingPolicy_predictiveScaling (62.36s)
--- PASS: TestAccAWSAutoscalingPolicy_disappears (63.85s)
--- PASS: TestAccAWSAutoscalingPolicy_TargetTrack_Custom (67.02s)
--- PASS: TestAccAWSAutoscalingPolicy_predictiveScalingRemoved (73.85s)
--- PASS: TestAccAWSAutoscalingPolicy_predictiveScalingUpdated (74.41s)
--- PASS: TestAccAWSAutoscalingPolicy_basic (92.73s)

@bill-rich bill-rich merged commit 11389e2 into main May 20, 2021
@bill-rich bill-rich deleted the f-predicitve_autoscaling branch May 20, 2021 01:18
@github-actions github-actions bot added this to the v3.42.0 milestone May 20, 2021
github-actions bot pushed a commit that referenced this pull request May 20, 2021
@ghost
Copy link

ghost commented May 20, 2021

This has been released in version 3.42.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

@github-actions
Copy link

I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. service/autoscaling Issues and PRs that pertain to the autoscaling service. size/XL Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants