Skip to content

[Bug]: Predictive autoscaling policy target_value does not accept double values #27817

Closed
@tuotempo

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

added
bugAddresses a defect in current functionality.
needs-triageWaiting for first response or review from a maintainer.
on Nov 15, 2022
github-actions

github-actions commented on Nov 15, 2022

@github-actions

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this 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.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.
removed
needs-triageWaiting for first response or review from a maintainer.
on Nov 24, 2022
added this to the v4.55.0 milestone on Feb 11, 2023
github-actions

github-actions commented on Feb 17, 2023

@github-actions

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

github-actions commented on Mar 20, 2023

@github-actions

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.

locked as resolved and limited conversation to collaborators on Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugAddresses a defect in current functionality.service/autoscalingIssues and PRs that pertain to the autoscaling service.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      [Bug]: Predictive autoscaling policy target_value does not accept double values · Issue #27817 · hashicorp/terraform-provider-aws