- Newest
- Most votes
- Most comments
Hello.
In "aws v5.70.0", the minimum allowed value for min_capacity is 1 or greater.
Perhaps updating your Terraform AWS provider will solve the problem.
https://registry.terraform.io/providers/hashicorp/aws/5.70.0/docs/resources/rds_cluster
min_capacity - (Optional) Minimum capacity for an Aurora DB cluster in serverless DB engine mode. The minimum capacity must be lesser than or equal to the maximum capacity. Valid Aurora MySQL capacity values are 1, 2, 4, 8, 16, 32, 64, 128, 256. Valid Aurora PostgreSQL capacity values are (2, 4, 8, 16, 32, 64, 192, and 384). Defaults to 1.
By the way, if it is "6.36.0", 0 is allowed as stated in the following document.
https://registry.terraform.io/providers/hashicorp/aws/6.36.0/docs/resources/rds_cluster
min_capacity - (Required) Minimum capacity for an Aurora DB cluster in provisioned DB engine mode. The minimum capacity must be lesser than or equal to the maximum capacity. Valid capacity values are in a range of 0 up to 256 in steps of 0.5.
This error occurs because you are using an AWS Provider version that predates the release of the "Scale to Zero" feature for Aurora Serverless v2.
AWS introduced the ability to scale to 0 ACUs in November 2024. The validation logic in your current provider version (v5.70.0) still enforces the legacy minimum limit of 0.5.
Recommended Solution
To resolve the validation error, you must upgrade your Hashicorp AWS Provider to v5.81.0 or later, which updated the schema to allow a 0 value for min_capacity.
- Update your configuration:
terraform { required_providers { aws = { source = "hashicorp/aws" version = "~> 5.81" } } }
- Initialize the update: Run
terraform init -upgradein your terminal.
Additional Requirements for Scaling to Zero
Once the provider is updated, ensure your clusters meet these mandatory AWS requirements:
- Engine Version: For PostgreSQL, you must be on version 13.16, 14.13, 15.8, 16.4, or higher. While your version
15.12is compatible, ensure any other clusters you are modifying also meet these minimums. - Auto-Pause Configuration: When
min_capacityis set to0, theseconds_until_auto_pauseattribute is required. Conversely, ifmin_capacityis0.5or greater, this attribute must be removed or it will trigger an API error. - Max Capacity: Even when scaling to zero, the
max_capacitymust be at least 1.0 ACU.
Why some clusters worked:
The clusters that "worked" likely had their min_capacity set to 0.5 or were previously managed outside of this specific Terraform workspace. Any cluster explicitly defined with min_capacity = 0 will continue to fail until the provider is upgraded to recognize 0 as a valid input.
The error you're encountering is expected behavior. The ability to set MinCapacity to 0 for Aurora Serverless v2 is only available for Aurora versions that support the Aurora Serverless v2 auto-pause feature.
For Aurora PostgreSQL engine version 15.12, the auto-pause feature may not be supported, which is why you're seeing the validation error requiring a minimum value of 0.5 ACUs instead of 0.
The minimum capacity requirements are:
- 0 ACUs: Only for Aurora versions that support the Aurora Serverless v2 auto-pause feature
- 0.5 ACUs: For versions that don't support Aurora Serverless v2 auto-pause (which appears to be your case)
The reason some of your clusters work correctly while others don't is likely due to differences in the specific Aurora engine versions being used across those clusters. Even minor version differences can affect feature availability.
To resolve this issue, you should set your min_capacity to 0.5 instead of 0 for Aurora PostgreSQL 15.12. You can verify whether your specific engine version supports the auto-pause feature by checking the attributes of your engine version or platform version to determine which features are supported.
Sources
ServerlessV2ScalingConfiguration - Amazon Relational Database Service
create_db_cluster - botocore 1.42.51 documentation
create_db_cluster - Boto3 1.42.51 documentation
modify_db_cluster - botocore 1.42.51 documentation
Relevant content
- asked 2 years ago
- asked 2 years ago
- AWS OFFICIALUpdated 4 months ago

We are running on 15.12, support became available in 15.7