Use Terraform to deploy MySQL 8.0 in AWS Aurora V2

Question:

I’m attempting to deploy a serverless MySQL 8.0 service using AWS Aurora V2 using Terraform.

Terraform details (not on latest version, but should be compatible with latest AWS provider version):

Here’s the relevant main.tf file:

The above file was originally a serverless MySQL 5.7 service using Aurora V1. I modified this existing main.tf file using these resources:

The terraform plan goes fine. When running terraform apply this error is present:

I can’t infer much from this error, I’m guessing something isn’t supporting this since the AWS provider v4.12.0 was released yesterday. I assume it could also be the version of Terraform itself, but again, I believe Terraform v0.15.4 is compatible with the v4.12.0 of the AWS provider.

My main goal is to switch the service from MySQL 5.7 serverless to MySQL 8.0 serverless.

Answer:

The engine_mode for Aurora Serverless 2 is provisioned, not serverless.

Leave a Reply