I'm working with an RDS Aurora Postgres Serverless V2 instance, and I thought I could set the minimum capacity to zero to save on costs when it's not in use. However, I keep running into an issue. My resource configuration looks like this:
```hcl
resource "aws_rds_cluster" "operational-postgresql-cluster-dev" {
cluster_identifier = "operational-postgresql-cluster-dev"
engine = "aurora-postgresql"
engine_version = "16.6"
engine_mode = "provisioned"
availability_zones = ["eu-central-1a", "eu-central-1b", "eu-central-1c"]
vpc_security_group_ids = [aws_security_group.dev_v1_security_group_rds.id]
db_subnet_group_name = aws_db_subnet_group.operational_db_dev_subnet_group.name
database_name = "operational_db_dev_v1"
master_username = "db_admin"
master_password = aws_secretsmanager_secret_version.operational_dev_db_password_v1.secret_string
skip_final_snapshot = false
final_snapshot_identifier = "aurora-postgres-dev-cluster-backup-v1"
backup_retention_period = 14
enable_http_endpoint = true
serverlessv2_scaling_configuration {
max_capacity = 1.0
min_capacity = 0.5
}
}
```
The article I read from AWS suggests that scaling down to zero is possible, but when I try to set `min_capacity` to 0.0, I get the following error:
*Error: expected serverlessv2_scaling_configuration.0.min_capacity to be in the range (0.500000 - 128.000000), got 0.000000*
Is this a bug, or do I need to use AWS CLI commands to enable this feature? Any help would be appreciated!
1 Answer
I had a similar issue with mine, where it seemed like it was configured correctly but never scaled down to zero during idle time. I set a timeout of 10 minutes, but it still didn't work as expected. Maybe it's something with the version or the timeout settings?
Related Questions
Cloudflare Origin SSL Certificate Setup Guide
How To Effectively Monetize A Site With Ads