Terraform AWS Aurora Serverless MySQL - 错误:无效的数据库引擎
Posted
技术标签:
【中文标题】Terraform AWS Aurora Serverless MySQL - 错误:无效的数据库引擎【英文标题】:Terraform AWS Aurora Serverless MySQL - Error: Invalid DB Engine 【发布时间】:2020-12-17 19:32:29 【问题描述】:我正在尝试使用 aws terraform rds 模块来启动 aurora serverless mysql 5.7 版本,但在创建数据库实例时出现以下错误,指向不正确的 DBEngine。
创建数据库实例时出错:InvalidParameterValue:无效的数据库引擎
resource "aws_rds_cluster" "test"
cluster_identifier = "test-cluster"
engine = "aurora-mysql"
engine_version = "5.7.12"
engine_mode = "serverless"
database_name = "rdstest"
master_username = "xxxxx"
master_password = "xxxxxxx"
kms_key_id = "arn:aws:kms:eu-west-1:792xxxxxx:key/09f01648-daf7-xxxxxxxx"
backup_retention_period = 7
port = 3306
db_cluster_parameter_group_name = aws_rds_cluster_parameter_group.aurora_cluster_mysql_parameter_group.name
vpc_security_group_ids = ["$aws_security_group.cachet_rds.id"]
availability_zones = ["eu-west-1a"]
db_subnet_group_name = aws_db_subnet_group.cachet.id
skip_final_snapshot = true
resource "aws_db_instance" "test"
identifier = "test"
allocated_storage = 20
storage_type = "gp2"
engine = "aurora-mysql"
engine_version = "5.7.12"
instance_class = "t3a.small"
db_subnet_group_name = aws_db_subnet_group.cachet.id
vpc_security_group_ids = ["$aws_security_group.cachet_rds.id"]
username = "xxxxx"
password = "xxxxx"
parameter_group_name = aws_rds_cluster_parameter_group.aurora_cluster_mysql_parameter_group.name
skip_final_snapshot = true
backup_retention_period = 5
storage_encrypted = true
kms_key_id = "arn:aws:kms:eu-west-1:79xxxxx:key/09f01648-daf7-47e7-af2f-xxxxxx"
resource "aws_db_parameter_group" "aurora_db_mysql_parameter_group"
name = "test-aurora-parameter-group"
family = "aurora-mysql5.7"
resource "aws_rds_cluster_parameter_group" "aurora_cluster_mysql_parameter_group"
name = "test-aurora-cluster-parameter-group"
family = "aurora-mysql5.7"
根据 AWS Docs,允许的家庭组是“aurora-mysql5.7”,engine_version 是“5.7.12”。https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Updates .serverless_2_07_01.html
尝试使用 EngineVersion:“5.7.mysql_aurora.2.08.2”和 EngineVersion 5.7.12。
【问题讨论】:
【参考方案1】:我认为这是因为拼写错误:
engine = "aurora-msql"
列出了可用的引擎here。因此应该有:
engine = "aurora-mysql"
请注意,可能还有其他不明显的错误。但是您的InvalidParameterValue: Invalid DB engine
问题很可能是拼写错误造成的。
【讨论】:
以上是关于Terraform AWS Aurora Serverless MySQL - 错误:无效的数据库引擎的主要内容,如果未能解决你的问题,请参考以下文章
[AWS][数据库]Aurora 动手实验&对比RDS Mysql性能