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

r/aws_autoscaling_policy: Support metric math for target tracking policy #28560

Conversation

jungseoklee
Copy link
Contributor

@jungseoklee jungseoklee commented Dec 23, 2022

Description

This PR supports metric math for EC2 Auto Scaling target tracking policy, which was released on Dec 8, 2022: https://aws.amazon.com/about-aws/whats-new/2022/12/amazon-ec2-auto-scaling-supports-metric-math-target-tracking-policies/

Relations

Closes #29148.
Closes #29145.

References

Output from Acceptance Testing

$ make testacc TESTS=TestAccAutoScalingPolicy PKG=autoscaling
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/autoscaling/... -v -count 1 -parallel 20 -run='TestAccAutoScalingPolicy'  -timeout 180m
=== RUN   TestAccAutoScalingPolicy_basic
=== PAUSE TestAccAutoScalingPolicy_basic
=== RUN   TestAccAutoScalingPolicy_disappears
=== PAUSE TestAccAutoScalingPolicy_disappears
=== RUN   TestAccAutoScalingPolicy_predictiveScalingPredefined
=== PAUSE TestAccAutoScalingPolicy_predictiveScalingPredefined
=== RUN   TestAccAutoScalingPolicy_predictiveScalingCustom
=== PAUSE TestAccAutoScalingPolicy_predictiveScalingCustom
=== RUN   TestAccAutoScalingPolicy_predictiveScalingRemoved
=== PAUSE TestAccAutoScalingPolicy_predictiveScalingRemoved
=== RUN   TestAccAutoScalingPolicy_predictiveScalingUpdated
=== PAUSE TestAccAutoScalingPolicy_predictiveScalingUpdated
=== RUN   TestAccAutoScalingPolicy_simpleScalingStepAdjustment
=== PAUSE TestAccAutoScalingPolicy_simpleScalingStepAdjustment
=== RUN   TestAccAutoScalingPolicy_TargetTrack_predefined
=== PAUSE TestAccAutoScalingPolicy_TargetTrack_predefined
=== RUN   TestAccAutoScalingPolicy_TargetTrack_custom
=== PAUSE TestAccAutoScalingPolicy_TargetTrack_custom
=== RUN   TestAccAutoScalingPolicy_TargetTrack_metricMath
=== PAUSE TestAccAutoScalingPolicy_TargetTrack_metricMath
=== RUN   TestAccAutoScalingPolicy_zeroValue
=== PAUSE TestAccAutoScalingPolicy_zeroValue
=== CONT  TestAccAutoScalingPolicy_basic
=== CONT  TestAccAutoScalingPolicy_simpleScalingStepAdjustment
=== CONT  TestAccAutoScalingPolicy_predictiveScalingCustom
=== CONT  TestAccAutoScalingPolicy_predictiveScalingUpdated
=== CONT  TestAccAutoScalingPolicy_predictiveScalingRemoved
=== CONT  TestAccAutoScalingPolicy_TargetTrack_metricMath
=== CONT  TestAccAutoScalingPolicy_predictiveScalingPredefined
=== CONT  TestAccAutoScalingPolicy_TargetTrack_custom
=== CONT  TestAccAutoScalingPolicy_zeroValue
=== CONT  TestAccAutoScalingPolicy_disappears
=== CONT  TestAccAutoScalingPolicy_TargetTrack_predefined
--- PASS: TestAccAutoScalingPolicy_simpleScalingStepAdjustment (37.41s)
--- PASS: TestAccAutoScalingPolicy_TargetTrack_custom (46.77s)
--- PASS: TestAccAutoScalingPolicy_TargetTrack_metricMath (49.11s)
--- PASS: TestAccAutoScalingPolicy_TargetTrack_predefined (49.31s)
--- PASS: TestAccAutoScalingPolicy_disappears (53.24s)
--- PASS: TestAccAutoScalingPolicy_predictiveScalingCustom (55.54s)
--- PASS: TestAccAutoScalingPolicy_predictiveScalingPredefined (56.88s)
--- PASS: TestAccAutoScalingPolicy_predictiveScalingUpdated (60.31s)
--- PASS: TestAccAutoScalingPolicy_zeroValue (60.72s)
--- PASS: TestAccAutoScalingPolicy_basic (68.31s)
--- PASS: TestAccAutoScalingPolicy_predictiveScalingRemoved (69.84s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/autoscaling	69.969s

@github-actions
Copy link

Community Note

Voting for Prioritization

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

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. 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. and removed needs-triage Waiting for first response or review from a maintainer. labels Dec 23, 2022
This patch supports metric math for EC2 Auto Scaling target tracking policy, which
was released on Dec 8, 2022.
Copy link
Collaborator

@AdamTylerLynch AdamTylerLynch left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@AdamTylerLynch AdamTylerLynch added the partner Contribution from a partner. label Jan 24, 2023
…cation

Signed-off-by: Mehmet Gungoren <mehgungoren@gmail.com>
Signed-off-by: Mehmet Gungoren <mehgungoren@gmail.com>
Signed-off-by: Mehmet Gungoren <mehgungoren@gmail.com>
…ication's metrics

Signed-off-by: Mehmet Gungoren <mehgungoren@gmail.com>
Signed-off-by: Mehmet Gungoren <mehgungoren@gmail.com>
Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

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

LGTM 🚀.

% make testacc TESTARGS='-run=TestAccAutoScalingPolicy_' PKG=autoscaling ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/autoscaling/... -v -count 1 -parallel 3  -run=TestAccAutoScalingPolicy_ -timeout 180m
=== RUN   TestAccAutoScalingPolicy_basic
=== PAUSE TestAccAutoScalingPolicy_basic
=== RUN   TestAccAutoScalingPolicy_disappears
=== PAUSE TestAccAutoScalingPolicy_disappears
=== RUN   TestAccAutoScalingPolicy_predictiveScalingPredefined
=== PAUSE TestAccAutoScalingPolicy_predictiveScalingPredefined
=== RUN   TestAccAutoScalingPolicy_predictiveScalingResourceLabel
=== PAUSE TestAccAutoScalingPolicy_predictiveScalingResourceLabel
=== RUN   TestAccAutoScalingPolicy_predictiveScalingCustom
=== PAUSE TestAccAutoScalingPolicy_predictiveScalingCustom
=== RUN   TestAccAutoScalingPolicy_predictiveScalingRemoved
=== PAUSE TestAccAutoScalingPolicy_predictiveScalingRemoved
=== RUN   TestAccAutoScalingPolicy_predictiveScalingUpdated
=== PAUSE TestAccAutoScalingPolicy_predictiveScalingUpdated
=== RUN   TestAccAutoScalingPolicy_predictiveScalingFloatTargetValue
=== PAUSE TestAccAutoScalingPolicy_predictiveScalingFloatTargetValue
=== RUN   TestAccAutoScalingPolicy_simpleScalingStepAdjustment
=== PAUSE TestAccAutoScalingPolicy_simpleScalingStepAdjustment
=== RUN   TestAccAutoScalingPolicy_TargetTrack_predefined
=== PAUSE TestAccAutoScalingPolicy_TargetTrack_predefined
=== RUN   TestAccAutoScalingPolicy_TargetTrack_custom
=== PAUSE TestAccAutoScalingPolicy_TargetTrack_custom
=== RUN   TestAccAutoScalingPolicy_TargetTrack_metricMath
=== PAUSE TestAccAutoScalingPolicy_TargetTrack_metricMath
=== RUN   TestAccAutoScalingPolicy_zeroValue
=== PAUSE TestAccAutoScalingPolicy_zeroValue
=== CONT  TestAccAutoScalingPolicy_basic
=== CONT  TestAccAutoScalingPolicy_predictiveScalingFloatTargetValue
=== CONT  TestAccAutoScalingPolicy_TargetTrack_custom
--- PASS: TestAccAutoScalingPolicy_TargetTrack_custom (49.39s)
=== CONT  TestAccAutoScalingPolicy_predictiveScalingCustom
--- PASS: TestAccAutoScalingPolicy_predictiveScalingFloatTargetValue (67.73s)
=== CONT  TestAccAutoScalingPolicy_predictiveScalingUpdated
--- PASS: TestAccAutoScalingPolicy_basic (100.45s)
=== CONT  TestAccAutoScalingPolicy_predictiveScalingRemoved
--- PASS: TestAccAutoScalingPolicy_predictiveScalingCustom (62.73s)
=== CONT  TestAccAutoScalingPolicy_predictiveScalingPredefined
--- PASS: TestAccAutoScalingPolicy_predictiveScalingUpdated (83.54s)
=== CONT  TestAccAutoScalingPolicy_predictiveScalingResourceLabel
--- PASS: TestAccAutoScalingPolicy_predictiveScalingRemoved (70.24s)
=== CONT  TestAccAutoScalingPolicy_zeroValue
--- PASS: TestAccAutoScalingPolicy_predictiveScalingPredefined (65.21s)
=== CONT  TestAccAutoScalingPolicy_TargetTrack_predefined
--- PASS: TestAccAutoScalingPolicy_predictiveScalingResourceLabel (64.28s)
=== CONT  TestAccAutoScalingPolicy_disappears
--- PASS: TestAccAutoScalingPolicy_zeroValue (57.50s)
=== CONT  TestAccAutoScalingPolicy_TargetTrack_metricMath
--- PASS: TestAccAutoScalingPolicy_TargetTrack_predefined (51.81s)
=== CONT  TestAccAutoScalingPolicy_simpleScalingStepAdjustment
--- PASS: TestAccAutoScalingPolicy_disappears (50.22s)
--- PASS: TestAccAutoScalingPolicy_TargetTrack_metricMath (50.94s)
--- PASS: TestAccAutoScalingPolicy_simpleScalingStepAdjustment (54.05s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/autoscaling	288.629s

@ewbankkit
Copy link
Contributor

@jungseoklee @gungoren Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit 78d002f into hashicorp:main Feb 25, 2023
@github-actions github-actions bot added this to the v4.57.0 milestone Feb 25, 2023
@jungseoklee
Copy link
Contributor Author

@AdamTylerLynch @ewbankkit Great thanks for reviewing and taking care of this PR!

@github-actions
Copy link

github-actions bot commented Mar 3, 2023

This functionality has been released in v4.57.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. Thank you!

@github-actions
Copy link

github-actions bot commented Apr 4, 2023

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 Apr 4, 2023
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. partner Contribution from a partner. 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.

[Enhancement]: Autoscalling CustomizedMetricSpecification's Metrics field is missing
4 participants