我正在尝试使用Terraform创建AWS RDS 数据库实例。我正在尝试使用PostgreSQL 12作为数据库。除了监控部分之外,一切似乎都很好,我无法在脚本中指定“ monitoring_role_arn ”。
\n以下是我用于创建 PostgreSQL 数据库实例的 Terraform 脚本:
\nrds.tf
\n# AWS PSQL RDS Instance \nresource "aws_db_instance" "test-DB" {\n\n depends_on = [aws_security_group.test-PSQL-DB-SG, aws_iam_role.test-IAM-Role-RDS]\n\n // General Configurations\n name = "testdb"\n identifier = "am-poc-spoke1-db"\n engine = "postgres"\n engine_version = "12.5"\n instance_class = "db.t2.micro" \n parameter_group_name = "default.postgres12"\n port = "5432"\n\n // Authentication\n username = "postgres"\n password = "postgres"\n\n // Storage Configurations\n storage_type = "gp2"\n allocated_storage = 20\n max_allocated_storage = 100\n\n // …Run Code Online (Sandbox Code Playgroud) amazon-web-services amazon-rds amazon-iam terraform terraform-provider-aws