terraform-aws-elasticache-redis icon indicating copy to clipboard operation
terraform-aws-elasticache-redis copied to clipboard

InvalidReplicationGroupState: Replication group must be in available state to modify

Open dmzeus opened this issue 1 year ago • 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::[email protected]:umotif-public/terraform-aws-elasticache-redis.git//.?ref=3.5.0"

dmzeus avatar Sep 23 '24 08:09 dmzeus

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)

dmzeus avatar Sep 23 '24 08:09 dmzeus

Found this issue: https://github.com/hashicorp/terraform-provider-aws/issues/33859#issuecomment-1998554835

dmzeus avatar Sep 23 '24 09:09 dmzeus