Terraform-provider-aws: "Invalid DB engine" when creating AWS/RDS Postgresql instance

Created on 9 May 2018  ยท  6Comments  ยท  Source: hashicorp/terraform-provider-aws

_This issue was originally opened by @a9tm as hashicorp/terraform#18009. It was migrated here as a result of the provider split. The original body of the issue is below._



I'm trying to launch a RDS Postgres instance but failed.

Terraform Version

Terraform v0.11.7
+ provider.aws v1.17.0

Terraform Configuration Files

resource "aws_db_subnet_group" "postgres" {
  name       = "postgres-subnets"
  subnet_ids = ["${var.net_priv_a_var}", "${var.net_priv_b_var}"]

  tags {
    Name = "Postgres DB subnet group"
  }
}
resource "aws_db_instance" "postgres" {
  allocated_storage    = 10
  storage_type         = "gp2"
  engine               = "postgresql"
  db_subnet_group_name = "${aws_db_subnet_group.postgres.id}"
  engine_version       = "9.6.6"
  instance_class       = "db.t2.small"
  name                 = "***"
  username             = "***"
  password             = "***"
}

Debug Output

Crash Output

Expected Behavior


RDS instance be created

Actual Behavior

* aws_db_instance.postgres: Error creating DB Instance: InvalidParameterValue: Invalid DB engine
        status code: 400, request id: 8f7e8cd3-94fb-45a6-b295-xxx

Steps to Reproduce

Additional Context

References

question servicrds

Most helpful comment

postgres works instead of postgresql, I hope terraform docs mention this piece. On the other thought, I wonder why it's not mys instead of mysql?

All 6 comments

Hi,
Have you tried with postgres engine (instead of postgresql) ?

Valid engines are listed here (https://docs.aws.amazon.com/cli/latest/reference/rds/create-db-instance.html), at the --engine section

postgres works instead of postgresql, I hope terraform docs mention this piece. On the other thought, I wonder why it's not mys instead of mysql?

This is how AWS decided to call it. Terraform AWS provider is using AWS SDK.

The complete list of engines is listed here under "Engine" section.

As @antonbabenko rightly mentioned we have the link to supported engines in relevant docs.
I don't believe there's more we can do at this point so I'm going to close this.

Thanks

usage:
engine = "postgres"

Should fix. @radeksimko thanks for closing :)

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