本文介绍了terraform和Aurora Postgresql的存储类型错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于Terraform,我目前正在努力在AWS中部署Aurora postgres实例.

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

这是我的声明

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:

如果我将引擎更改为

,它工作正常,但我需要一个aurora实例.

, it works fine but i need an aurora instance.

关于我在这里的声明有什么问题的任何想法吗?

Any idea on what is wrong with my declaration here ?

非常感谢您.

推荐答案

感谢您的帮助.

我找到了解决方案.实际上,Aurora实例不需要存储类型.但是必须在数据库集群中创建它.因此,您首先必须创建集群,然后使用正确的集群标识符创建数据库实例.

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.

这篇关于terraform和Aurora Postgresql的存储类型错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-07 01:04