-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Support defining period in custom metrics for target tracking policies #41385
Support defining period in custom metrics for target tracking policies #41385
Conversation
Following up from hashicorp#41066, this patch adds the `period` field to the `customized_metric_specification` to allow overriding the period the metric is observed.
Community NoteVoting for Prioritization
For Submitters
|
…etTrackingConfiguration.customizedMetricSpecification.period' failed to satisfy constraint: Member must have value greater than or equal to 1".
There was a problem hiding this 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
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.5 test ./internal/service/autoscaling/... -v -count 1 -parallel 3 -run=TestAccAutoScalingPolicy_ -timeout 360m -vet=off
2025/02/24 08:13:33 Initializing Terraform AWS Provider...
=== 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 (58.26s)
=== CONT TestAccAutoScalingPolicy_zeroValue
--- PASS: TestAccAutoScalingPolicy_predictiveScalingFloatTargetValue (71.05s)
=== CONT TestAccAutoScalingPolicy_TargetTrack_metricMath
--- PASS: TestAccAutoScalingPolicy_zeroValue (72.09s)
=== CONT TestAccAutoScalingPolicy_predictiveScalingCustom
--- PASS: TestAccAutoScalingPolicy_basic (133.51s)
=== CONT TestAccAutoScalingPolicy_predictiveScalingUpdated
--- PASS: TestAccAutoScalingPolicy_TargetTrack_metricMath (92.53s)
=== CONT TestAccAutoScalingPolicy_predictiveScalingRemoved
--- PASS: TestAccAutoScalingPolicy_predictiveScalingCustom (73.17s)
=== CONT TestAccAutoScalingPolicy_TargetTrack_predefined
--- PASS: TestAccAutoScalingPolicy_predictiveScalingUpdated (112.35s)
=== CONT TestAccAutoScalingPolicy_simpleScalingStepAdjustment
--- PASS: TestAccAutoScalingPolicy_predictiveScalingRemoved (94.91s)
=== CONT TestAccAutoScalingPolicy_disappears
--- PASS: TestAccAutoScalingPolicy_TargetTrack_predefined (63.29s)
=== CONT TestAccAutoScalingPolicy_predictiveScalingResourceLabel
--- PASS: TestAccAutoScalingPolicy_simpleScalingStepAdjustment (61.01s)
=== CONT TestAccAutoScalingPolicy_predictiveScalingPredefined
--- PASS: TestAccAutoScalingPolicy_disappears (57.95s)
--- PASS: TestAccAutoScalingPolicy_predictiveScalingResourceLabel (64.60s)
--- PASS: TestAccAutoScalingPolicy_predictiveScalingPredefined (69.79s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/autoscaling 382.190s
@carlosgaldino Thanks for the contribution 🎉 👏. |
This functionality has been released in v5.89.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! |
Description
Following up from #41066, this patch adds the
period
field to thecustomized_metric_specification
to allow overriding the period the metric is observed.Relations
Relates #41066
References
Output from Acceptance Testing
My accounts don't support launch configuration so I can't test. It's the same reason as in the previous PR I opened before.