Terraform-provider-aws: Feature Request: RDS Aurora Engine Mode (Serverless Support)

Created on 10 Aug 2018  ·  12Comments  ·  Source: hashicorp/terraform-provider-aws

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

Tucked away in the v1.15.9 AWS SDK update is this tidbit:

Launch RDS Aurora Serverless

Briefly looking at the SDK changes, it looks like this is supported via a new EngineMode parameter for DBCluster and its create/restore from snapshot inputs.

New or Affected Resource(s)

  • aws_rds_cluster

Potential Terraform Configuration

# Potential implementation, may change during development
resource "aws_rds_cluster" "example" {
  # ... other configuration ...
  engine_mode = "" # provisioned or serverless
}

References

enhancement servicrds

Most helpful comment

Hi @adrianomelo
For aurora 5.6.10ann you need to set engine = "aurora".
For aurora 5.7.12 you need to set engine = "aurora-mysql" and engine_version: "5.7.12".

@bflad thanks for your help :)

All 12 comments

I don't mind tackling this one. Looks like EngineMode is already in API responses: <EngineMode>provisioned</EngineMode>

PR submitted: #5507

Support for this has been merged in and will release with version 1.32.0 of the AWS provider, later this week. 👍

This has been released in version 1.32.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@bflad There is a bug here, When you try to apply Aurora in Singapore fail, because don't support the engine mode parameter.

The issue remains in version 1.32.0

This is the error message I am getting when trying to create mysql aurora in ap-southeast-1 region.

Error: Error applying plan:

1 error(s) occurred:

* module.rds_aurora_mydb.aws_rds_cluster.default: 1 error(s) occurred:

* aws_rds_cluster.default: error creating RDS cluster: InvalidParameterValue: The engine mode provisioned you requested is currently unavailable.
    status code: 400, request id: db186c68-2908-4f7c-b639-9004871288be

Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.

Hi @giannisbetas, please see #5593 or create a new issue with your configuration, thanks. Some investigative work with #5593 is showing that the InvalidParameterValue: The engine mode provisioned you requested is currently unavailable. error message can be caused by an incorrect engine_version configuration and that removing it or correctly specifying it will correctly create RDS clusters.

Using engine = "aurora" instead of engine = "aurora-mysql" solved the problem described by @giannisbetas for me.

Hi @adrianomelo
For aurora 5.6.10ann you need to set engine = "aurora".
For aurora 5.7.12 you need to set engine = "aurora-mysql" and engine_version: "5.7.12".

@bflad thanks for your help :)

Creating a new Aurora database in the AWS console displays this information:

MySQL 5.6-compatible
Aurora Serverless and Parallel Query capacities are only available with this edition.

In other words, it says that Aurora's serverless mode requires engine_version compatible with MySQL 5.6.

Still cannot get around this one. Any help would be great.

provider "aws"{
  version = "~>2"
}

module "serverless_aurora_cluster" {
  name              = "cool_database"
  database_name     = "microbiome"
  engine            = "aurora" 
  engine_version    = "5.6.10"
  auto_pause        = true
}

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

Was this page helpful?
0 / 5 - 0 ratings