创建数据库实例时出错:InvalidParameterValue:PostgreSQL数据库的数据库引擎无效
我正在尝试使用 Terraform 创建一个 PostgreSQL RDS 实例。这是我的配置的外观:
resource "aws_db_subnet_group" "postgres" {
name = "postgres-subnets"
subnet_ids = ["mysub1","mysub2"]
}
resource "aws_db_instance" "myrds" {
engine = "postgresql"
engine_version = "12.4"
instance_class = "db.t2.micro"
identifier = "myrds"
username = "myuser"
password = "*******"
allocated_storage = 10
storage_type = "gp2"
db_subnet_group_name = "${aws_db_subnet_group.postgres.id}"
}
它失败并出现以下错误:
Error: Error creating DB Instance: InvalidParameterValue: Invalid DB engine
回答
Terraform 文档需要添加支持的引擎名称:
engine = "postgresql"
不正确。支持的值为"postgres"
THE END
二维码