terraform aurora 5.7配置错误

时间:2018-04-06 07:58:46

标签: amazon-rds terraform

是否有人能够使用terraform配置极光5.7?我坚持以下错误。任何想法为什么?

    * aws_rds_cluster.default: InvalidParameterCombination: 
    The Parameter Group test-aurora-57-cluster-parameter-group with DBParameterGroupFamily 
aurora-mysql5.7 cannot be used for this instance. Please use a Parameter Group with DBParameterGroupFamily oscar5.6
      status code: 400, request id: 09b5d660-1d71-49bf-a5de-a62b87805038

以下是群集和群集实例配置:

resource "aws_rds_cluster_instance" "cluster_instance" {
       #...
        db_parameter_group_name = "${aws_db_parameter_group.aurora_db_57_parameter_group.id}"
}


resource "aws_rds_cluster" "default" {
          #...
          db_cluster_parameter_group_name = "${aws_rds_cluster_parameter_group.aurora_57_cluster_parameter_group.id}"
}

resource "aws_db_parameter_group" "aurora_db_57_parameter_group" {
          name        = "test-aurora-db-57-parameter-group"
          family      = "aurora-mysql5.7"
          description = "test-aurora-db-57-parameter-group"
}

resource "aws_rds_cluster_parameter_group" "aurora_57_cluster_parameter_group" {
     name        = "test-aurora-57-cluster-parameter-group"
     family      = "aurora-mysql5.7"
     description = "test-aurora-57-cluster-parameter-group"
}

1 个答案:

答案 0 :(得分:1)

您应该为群集和实例部分指定引擎版本。

resource "aws_rds_cluster" "aurora" {
  engine = "aurora-mysql"
  ...
}

resource "aws_rds_cluster_instance" "aurora_instance" {
  engine = "aurora-mysql"
  ...
}