我正在尝试使用postgresql提供程序在 AWS 中创建的 postgres RDS 中创建数据库。我创建的 terraform 脚本如下:
resource "aws_db_instance" "test_rds" {
allocated_storage = "" # gigabytes
backup_retention_period = 7 # in days
engine = ""
engine_version = ""
identifier = ""
instance_class = ""
multi_az = ""
name = ""
username = ""
password = ""
port = ""
publicly_accessible = "false"
storage_encrypted = "false"
storage_type = ""
vpc_security_group_ids = ["${aws_security_group.test_sg.id}"]
db_subnet_group_name = "${aws_db_subnet_group.rds_subnet_group.name}"
}
Run Code Online (Sandbox Code Playgroud)
postgresql 提供程序如下:
# Create databases in rds
provider "postgresql" {
alias = "alias" …Run Code Online (Sandbox Code Playgroud) postgresql amazon-web-services amazon-rds terraform-provider-aws