3
votes

I'm trying to create an RDS Cluster Aurora-MySQL with one instance in it.

I get this error: "InvalidParameterValue: The engine mode provisioned you requested is currently unavailable"

I tried using "serverless" and get the same error.

Region: Ireland (eu-west-1)

Any suggestions?

2
Did you create it via the AWS Management Console or using the API or CLI?Pampy
@Pampy I'm using TerraformGal Gibli
Then maybe some parameter is wrong. Can you maybe post the configuration you're using to set it up?Pampy
Yep indeed, please provide the terraform code snippet you are trying to executeThomasVdBerge
source code should be provided if you expect any help from StackoverflowJakub Bujny

2 Answers

3
votes

When I put engine = aurora-mysql only in the cluster or only in the instance configuration it didn't work. I needed to put it in both.

This is the working code for now

resource "aws_rds_cluster" "rds-cluster" {
    cluster_identifier = "${var.env}-cluster"
    engine = "aurora-mysql"
    engine_version = "5.7.12"
    database_name = "${var.env}rds"
    master_username = "${var.env}"
    master_password = "**********"
    backup_retention_period = 5
    preferred_backup_window = "04:00-22:00"
    skip_final_snapshot = true
}

resource "aws_rds_cluster_instance" "rds-instance" {
    count = 1
    identifier = "${var.env}-db-${count.index}"
    cluster_identifier = "${aws_rds_cluster.rds-cluster.id}"
    instance_class = "db.r4.large"
    engine_version = "5.7.12"
    engine = "aurora-mysql"
}
2
votes

engine and engine_version are mandatory parameters for Create API calls, be it instance or cluster. When you provision via AWS Console, these details are taken care of automatically by the console, but if you're using the SDK or CLI, you'd need to pass in all the parameters explicitly. The MAN pages and/or AWS Docs would come of help in such cases.

P.S. I did expect a different error message though for this case.