title: Terraform plan failing while AWS Elasticache Redis cluster is scaling out
body: <p>Have made a redis cluster (cluster mode enabled) in AWS using Terraform; whenever the cluster is scaling, all terraform plan and apply actions fail.</p>
  <p>This is a problem as while the Redis Cluster is auto-scaling, there is no ability to change any other resources in the AWS account from terraform. Given it takes 10~ minutes or so to scale out, this could become a general issue for maintenance of other components of the environment.</p>
  <p>I have no need for terraform to manage the state of the cluster instances, only require it to initially bootstrap the cluster. Management and scaling of the cluster will be managed by a Lambda resource.</p>
  <p>I expect that I should be able to perform terraform plan and apply operations in terraform on other AWS resources while the cluster is resizing.</p>
  <h2>What I'm observing</h2>
  <p>When scaling-out Redis cluster in the AWS UI (either Adding shards, or nodes to a shard), existing nodes statuses change to &quot;modifying&quot;, during which time, any terraform plan or apply operations fail:</p>
  <pre><code>Error: error listing tags for resource (arn:aws:elasticache:ap-southeast-2::cluster:router-redis-cache-0001-001): CacheClusterNotFound: router-redis-cache-0001-001 is either not present or not available.
          status code: 404, request id: b6cfcff3-dfa7-41cf-b099-0eb0c9767990
  </code></pre>
  <h2>Steps to reproduce</h2>
  <ul>
  <li>Add the following to main.tf, :</li>
  </ul>
  <pre><code># Configure your AWS Provider
  provider &quot;aws&quot; {
    region = &quot;us-east-1&quot;
  }
  
  resource &quot;aws_elasticache_replication_group&quot; &quot;this&quot; {
    count = 1
  
    at_rest_encryption_enabled    = true
    multi_az_enabled              = true
    automatic_failover_enabled    = true
    replication_group_id          = &quot;users-cache&quot;
    replication_group_description = &quot;Users Redis cache&quot;
    node_type                     = &quot;cache.t3.medium&quot;
    parameter_group_name          = &quot;default.redis6.x.cluster.on&quot;
    port                          = 6379
  
    cluster_mode {
      num_node_groups         = 1 # Number of initial shards
      replicas_per_node_group = 1 # Number of initial replicas within each shard
    }
  
    apply_immediately = true
  
    lifecycle {
      ignore_changes = [
        # Scaling the instances in AWS will change cluster_mode.num_node_groups, custer_mode.replicas_per_node_group;
        # disregard drift from initial configuration.
        cluster_mode,
      ]
    }
  }
  </code></pre>
  <ul>
  <li>terraform apply</li>
  <li>wait for operation to complete</li>
  <li>log into AWS account</li>
  <li>find Elasticache cluster</li>
  <li>scale out the cluster (e.g. click &quot;Add shard&quot;)</li>
  <li>note that the cluster goes into 'modifying' state</li>
  <li>run <code>terraform plan</code></li>
  <li>observe failure</li>
  </ul>