3

I am currently working on deploying a Aurora postgres instance in AWS thanks to Terraform.

Here is my declaration

resource "aws_db_instance" "postgreDatabase" {
  name = "validName"
  storage_type = "gp2"
  allocated_storage = "25"
  engine = "aurora-postgresql"
  engine_version = "10.5"
  instance_class = "db.r4.large"
  username = "validUsername"
  password = "validPassword"

}

Using this declaration throws the following error:

aws_db_instance.postgreDatabase: Error creating DB Instance: StorageTypeNotSupported: Invalid storage type: gp2

If i change the engine to

engine = "postgres"

, it works fine but i need an aurora instance.

Any idea on what is wrong with my declaration here ?

Thank you very much.

1
  • The error message seems to imply that gp2 storage is incompatible with Arurora Postgres. Commented May 2, 2019 at 13:08

2 Answers 2

6

Thank you for the help.

I found the solution. Indeed the storage type is not needed for an aurora instance. But it must be created inside a DB cluster. So you first have to create the cluster then create the db instance with the proper cluster identifier.

Sign up to request clarification or add additional context in comments.

Comments

3

aurora-postgresql is an AWS managed DB and does not offer storage_type as a configuration parameter.

If storage_type is a required configuration, using AWS RDS postgres is probably best.

If Aurora management is desired, the DB instance type can be configured for maximum performance.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.