-
-
Notifications
You must be signed in to change notification settings - Fork 630
feat: Add support for predictive autoscaling policies #361
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
feat: Add support for predictive autoscaling policies #361
Conversation
I want to address a naming inconsistency across
Target tracking using dimensionS while all predictive scaling metrics use dimension naming. In the module configuration, I decided to use metrics = optional(list(object({
expression = optional(string)
id = string
label = optional(string)
metric_stat = optional(object({
metric = object({
dimensions = optional(list(object({
name = string
value = string
})))
metric_name = string
namespace = string
})
stat = string
unit = optional(string)
}))
return_data = optional(bool)
}))) I believe it can help prevent mistakes or typos when using multiple scaling policies for a single service. |
thats due to the API - https://github.com/hashicorp/terraform-provider-aws/blob/782cca0e2343caa5ee37950708d563ef25a95aa7/internal/service/appautoscaling/policy.go#L249 We usually try to match the underlying API since thats the easiest and least confusing, only deviating in select scenarios |
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.
great start! few changes to the structure and definitions
sorting: - variables.tf, modules/service/{main,variables}.tf - all fields sorted to match fields on the AWS provider changes: - removed `try` blocks for `predictive_scaling_policy_configuration` arguments - metric_specification: object -> list(object) - metric_data_query.metric_stat: object -> list(object) - metric_data_query.metric_stat.metric: object -> list(object) - metric_data_query.metric_stat.metric and .namespace: became optional
@bryantbiggs, I tried to apply all your suggestions. The only one I didn't understand is: #361 (comment). |
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.
looks great, thank you for the contribution!
## [6.7.0](v6.6.2...v6.7.0) (2025-10-22) ### Features * Add support for predictive autoscaling policies ([#361](#361)) ([f731feb](f731feb))
This PR is included in version 6.7.0 🎉 |
Description
Added support for predefined metrics
predefined_load_metric_specification
predefined_metric_pair_specification
predefined_scaling_metric_specification
Added support for customized metrics
customized_capacity_metric_specification
customized_load_metric_specification
customized_scaling_metric_specification
Motivation and Context
predictive_scaling_policy_configuration
configuration block for service autoscaling #352Breaking Changes
No
How Has This Been Tested?
examples/*
to demonstrate and validate my change(s)examples/*
projectspre-commit run -a
on my pull request