【问题标题】:Unable to configure Parameter Group for Neptune Cluster无法为 Neptune 集群配置参数组
【发布时间】:2022-11-25 23:47:02
【问题描述】:

我正在尝试使用 terraform 创建 Neptune DB,但面临以下问题。

请找到我正在使用的 terraform 脚本。

## Create Neptune DB cluster and instance
resource "aws_neptune_cluster_parameter_group" "neptune1" {
  family      = "neptune1.2"
  name        = "neptune1"
  description = "neptune cluster parameter group"

  parameter {
    name  = "neptune_enable_audit_log"
    value = 1
    apply_method = "pending-reboot"
  }
}

resource "aws_neptune_cluster" "gh-cluster" {
  cluster_identifier                  = "gh-db"
  skip_final_snapshot                 = true
  iam_database_authentication_enabled = false
  apply_immediately                   = true
  neptune_subnet_group_name           = "${aws_neptune_subnet_group.gh-dbg.name}"
  vpc_security_group_ids              = ["${aws_security_group.sgdb.id}"]
  iam_roles                           = ["${aws_iam_role.NeptuneRole.arn}"]
}

resource "aws_neptune_cluster_instance" "gh-instance" {
  count              = 1
  cluster_identifier = "${aws_neptune_cluster.gh-cluster.id}"
  engine             = "neptune"
  instance_class     = "db.r5.large"
  apply_immediately  = true
}



resource "aws_neptune_subnet_group" "gh-dbg" {
  name       = "gh-dbg"
  subnet_ids = ["${aws_subnet.private.id}" , "${aws_subnet.public.id}"]
}

我想我没有将参数组添加到 Neptune 数据库中,我不确定该怎么做。

我在 terraform 实例脚本中尝试了以下键。

  1. db_parameter_group
  2. 参数组名称

    但是两者都在抛出错误——“这里不应该有这个论点”

【问题讨论】:

    标签: amazon-web-services terraform amazon-rds terraform-provider-aws


    【解决方案1】:

    根据Official documentation,您正在寻找的参数是“neptune_cluster_parameter_group_name”

    resource "aws_neptune_cluster" "gh-cluster" {
      cluster_identifier                   = "gh-db"
      skip_final_snapshot                  = true
      iam_database_authentication_enabled  = false
      apply_immediately                    = true
      neptune_subnet_group_name            = "${aws_neptune_subnet_group.gh-dbg.name}"
      vpc_security_group_ids               = ["${aws_security_group.sgdb.id}"]
      iam_roles                            = ["${aws_iam_role.NeptuneRole.arn}"]
      neptune_cluster_parameter_group_name = "${aws_neptune_cluster_parameter_group.neptune1.name}"
    }
    

    【讨论】:

      猜你喜欢
      • 2021-10-05
      • 1970-01-01
      • 1970-01-01
      • 2016-07-08
      • 2021-06-03
      • 2020-01-05
      • 2018-12-21
      • 2016-08-23
      • 1970-01-01
      相关资源
      最近更新 更多