hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.87k stars 9.21k forks source link

[Bug]: serverlessv2_scaling_configuration doesnt support 0 ACU #40421

Open garym-krrv opened 13 hours ago

garym-krrv commented 13 hours ago

Terraform Core Version

1.5.7

AWS Provider Version

5.79.0

Affected Resource(s)

aws_rds_cluster

Expected Behavior

This configuration is valid with the new release of Serverless v2 https://aws.amazon.com/blogs/database/introducing-scaling-to-0-capacity-with-amazon-aurora-serverless-v2/

It used to be a minimum ACU of 0.5 but that has now changed to 0

resource "aws_rds_cluster" "example" {
  # ... other configuration ...

  serverlessv2_scaling_configuration {
    max_capacity = 256.0
    min_capacity = 0
  }
}

MinCapacity -> (double)

The minimum number of Aurora capacity units (ACUs) for a DB instance in an Aurora Serverless v2 cluster. You can specify ACU values in half-step increments, such as 8, 8.5, 9, and so on. For Aurora versions that support the Aurora Serverless v2 auto-pause feature, the smallest value that you can use is 0. For versions that don’t support Aurora Serverless v2 auto-pause, the smallest value that you can use is 0.5.

Actual Behavior

Error: expected serverlessv2_scaling_configuration.0.min_capacity to be in the range (0.500000 - 256.000000), got 0.000000

Relevant Error/Panic Output Snippet

Planning failed. Terraform encountered an error while generating this plan.

╷
│ Error: expected serverlessv2_scaling_configuration.0.min_capacity to be in the range (0.500000 - 256.000000), got 0.000000

Terraform Configuration Files

NA

Steps to Reproduce

resource "aws_rds_cluster" "example" {
  # ... other configuration ...

  serverlessv2_scaling_configuration {
    max_capacity = 256.0
    min_capacity = 0
  }
}

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

Yes

github-actions[bot] commented 13 hours ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue