Engine_version:使用版本 6 或更高版本时,Redis 版本必须匹配 <major>.x,或 <major>.<minor>.<bug-fix>

cha*_* ly 5 redis terraform terraform-provider-aws

我有以下弹性资源:

resource "aws_elasticache_subnet_group" "main" {
  name       = "${var.identifier}-sng"
  subnet_ids = var.subnet_ids
}

resource "aws_elasticache_cluster" "main" {
  cluster_id           = var.identifier
  engine               = "redis"
  node_type            = var.node_type
  num_cache_nodes      = var.nodes_count
  parameter_group_name = var.parameter_group_name
  engine_version       = var.engine_version
  port                 = 6379
  security_group_ids   = var.security_group_ids
  subnet_group_name    = aws_elasticache_subnet_group.main.name

  tags = {
    "redis" = "Auto managed by TF"
  }
}
Run Code Online (Sandbox Code Playgroud)

我使用 aws elasticache Redis 6.0.5 运行,我的 var.engine_version 也设置为 6.0.5。它运行得很好,直到我从 terraform 1.3 升级到 1.4 为止,我收到了以下错误:

engine_version: Redis versions must match <major>.x when using version 6 or higher,
or <major>.<minor>.<bug-fix>
Run Code Online (Sandbox Code Playgroud)

升级后有人遇到这个问题吗?解决这个问题的解决方案是什么?

Kei*_*lle 1

刚刚遇到这个问题,我可以通过将parameter_group_name家庭设置6.x为engine_version6.0 来解决。当我将引擎版本设置为 6.0.5 时,它引发了上面列出的错误。6.0引擎版本默认为6.0.5