Closed
Description
Terraform Core Version
1.1.4
AWS Provider Version
4.36.1
Affected Resource(s)
- aws_autoscaling_policy
Expected Behavior
The argument "target_value" of predictive_scaling_configuration.metric_specification should accept double values as specified also in cloudformation document: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-scalingpolicy-predictivescalingmetricspecification.html
Actual Behavior
Terraform rasies the following error:
╷
│ Error: Attribute must be a whole number, got 0.2
│
│ with aws_autoscaling_policy.foreground_predictive_autoscaling,
│ on asg.tf line 432, in resource "aws_autoscaling_policy" "test_predictive_autoscaling":
│ 432: target_value = 0.2
│
╵
Relevant Error/Panic Output Snippet
╷
│ Error: Attribute must be a whole number, got 0.2
│
│ with aws_autoscaling_policy.foreground_predictive_autoscaling,
│ on asg.tf line 432, in resource "aws_autoscaling_policy" "test_predictive_autoscaling":
│ 432: target_value = 0.2
│
╵
Terraform Configuration Files
resource "aws_autoscaling_policy" "test_predictive_autoscaling" {
autoscaling_group_name = "MyASG"
name = "my_asg_scaling_policy"
policy_type = "PredictiveScaling"
predictive_scaling_configuration {
mode = "ForecastOnly"
metric_specification {
target_value = 0.2
// ...
}
}
}
Steps to Reproduce
terraform validate
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
No response
Activity
github-actions commentedon Nov 15, 2022
Community Note
Voting for Prioritization
Volunteering to Work on This Issue
github-actions commentedon Feb 17, 2023
This functionality has been released in v4.55.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 commentedon Mar 20, 2023
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.