Engine_version: Redis versions must match <major>.x when using version 6 or higher, or <major>.<minor>.<bug-fix>

Viewed 1639

I have the following elasticache resource:

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"
  }
}

I run with aws elasticache Redis 6.0.5 and my var.engine_version is set with 6.0.5 too. It worked quite well until I've upgraded from terraform 1.3 to 1.4 I received the following error:

engine_version: Redis versions must match <major>.x when using version 6 or higher,
or <major>.<minor>.<bug-fix>

Is there anyone experiencing this issue after upgrading? what would be a solution to work around this problem?

1 Answers

Just ran into this problem and I was able to fix by setting parameter_group_name family to 6.x and engine_version to 6.0. When I set the engine version to 6.0.5 it threw the error you listed above. The 6.0 engine version defaults to 6.0.5

Related