umotif-public/terraform-aws-elasticache-redis

InvalidReplicationGroupState: Replication group must be in available state to modify

Opened this issue · 2 comments

What is the current behavior?
Got an error Error: modifying ElastiCache Replication Group (*****) shard configuration: error modifying ElastiCache Replication Group shard configuration: InvalidReplicationGroupState: Replication group must be in available state to modify.
when we change node_type and if it's in the tags:

locals {
  node_type = "cache.t4g.small"
}

inputs = {
  node_type = local.node_type
...

tags = { node-type = "${local.node_type}" }
}

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

  1. Add variable for node_type to locals
  2. Add this variable to tags and inputs
  3. Change node_type and apply it
  4. Profit.. )

What is the expected behavior?
Running a node type update before or after a tag change

Software versions?
source = "git::git@github.com:umotif-public/terraform-aws-elasticache-redis.git//.?ref=3.5.0"

There is a plan example:

# aws_elasticache_replication_group.redis will be updated in-place
  ~ resource "aws_elasticache_replication_group" "redis" {
      ~ node_type                      = "cache.t4g.small" -> "cache.t4g.micro"
      ~ tags                           = {
          ~ "node_type"        = "cache.t4g.small" -> "cache.t4g.micro"
      ~ tags_all                       = {
          ~ "node_type"        = "cache.t4g.small" -> "cache.t4g.micro"
            # (6 unchanged elements hidden)
        # (36 unchanged attributes hidden)