2
votes

I am trying to provision a Aurora Serverless database via Terraform. I have following setup.

resource "aws_rds_cluster" "auth-db-cluster" {
  cluster_identifier        = "auth-db-cluster"
  engine                    = "aurora-postgresql"
  engine_mode               = "serverless"
  engine_version            = "10.7"
  database_name             = "${var.auth_db_name}"
  master_username           = "${var.auth_db_user}"
  master_password           = "${var.auth_db_password}"
  db_subnet_group_name      = "${aws_db_subnet_group.rds-subnet-group.id}"
  vpc_security_group_ids    = ["${aws_security_group.rds-security-group.id}"]
  skip_final_snapshot       = true
  final_snapshot_identifier = "Ignore"
}

resource "aws_rds_cluster_instance" "cluster_instances" {
  count              = 1
  identifier         = "auth-db-cluster-instance"
  cluster_identifier = "${aws_rds_cluster.auth-db-cluster.id}"
  instance_class     = "db.t3.micro"
}

Terraform fails will the following error:

  • aws_rds_cluster.auth-db-cluster: error creating RDS cluster: InvalidParameterValue: The engine mode serverless you requested is currently unavailable. status code: 400, request id: 7d8bcb5b-0c41-4498-853d-5c6cfd491dd8
2

2 Answers

1
votes

Take a look at the region that you are trying to create your database, Aurora Serverless using PostgreSQL engine is not available in all regions yet. At this moment (January 2020) it's available only on eu-west-1 in Europe and us-east-1, us-east-2, us-west-2 in North America for example.

1
votes

also, look at the exact engine_version name at: aws rds describe-db-engine-versions