terraform-aws-modules / terraform-aws-rds-aurora

Terraform module to create AWS RDS Aurora resources 🇺🇦
https://registry.terraform.io/modules/terraform-aws-modules/rds-aurora/aws
Apache License 2.0
386 stars 573 forks source link

InvalidParameterValue: Capacity value 1 is not valid. #270

Closed nicklunt closed 2 years ago

nicklunt commented 2 years ago

Initial terraform apply works great. Then making no changes just running a plan immediately says the min_capacity is going to be changed from 2 -> 1.

 ~ scaling_configuration {
   ~ min_capacity             = 2 -> 1
}

Running the terraform apply then gives this back

╷
│ Error: Failed to modify RDS Cluster (custodianmdr): InvalidParameterValue: Capacity value 1 is not valid. The valid scaling range for this cluster is 2 to 384. To change the clusters scaling range use the ModifyDBCluster call.
│       status code: 400, request id: 24b329d3-26a0-454b-a35e-c2ac75812be8
│
│   with module.aurora_pg_db.aws_rds_cluster.this[0],
│   on modules/terraform-aws-rds-aurora/main.tf line 45, in resource "aws_rds_cluster" "this":
│   45: resource "aws_rds_cluster" "this" {

I have run terraform destroy, rm -rf .terraform and reapplied but I get the same issue.

I am calling the module with this

module "aurora_pg_db" {
  source = "./modules/terraform-aws-rds-aurora"

  name           = var.aurora_database_name
  engine         = "aurora-postgresql"
  engine_mode  = "serverless"
  autoscaling_enabled    = false
  create_random_password = false
  master_username        = local.db_creds.username
  master_password        = local.db_creds.password
  deletion_protection    = false
  skip_final_snapshot    = true
  vpc_id                 = var.aurora_vpc_id
  subnets                = flatten(var.aurora_subnet_ids)
  allowed_cidr_blocks    = ["0.0.0.0/0"]
}

Provider plugins aws v4.0.0 random v3.1.0

I suspect user error, but can't see how.

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this issue will be closed in 10 days

github-actions[bot] commented 2 years ago

This issue was automatically closed because of stale in 10 days

smcpeck commented 1 year ago

FWIW, this is still an issue with serverless Aurora.

github-actions[bot] commented 1 year ago

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.