hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.74k stars 9.1k forks source link

[Bug]: Elasticache Replication Group Snapshot Limit Update Failure #39276

Open tcd156 opened 6 days ago

tcd156 commented 6 days ago

Terraform Core Version

1.5.7

AWS Provider Version

5.64.0

Affected Resource(s)

aws_elasticache_replication_group

Expected Behavior

Update snapshot_retention_limit from 0 to 10 on an Elasticache Redis cluster that has 1 node named {node}-002 Cluster is updated with new 10 day retention limit

Actual Behavior

Update snapshot_retention_limit from 0 to 10 on an Elasticache Redis cluster that has 1 node named {node}-002 Terraform receives this error: CacheClusterNotFound: Specified snapshotting cluster does not exist Add node to Elasticache cluster with name {node}-001 Terraform works correctly

Relevant Error/Panic Output Snippet

Error: modifying ElastiCache Replication Group ({group}): operation error ElastiCache: ModifyReplicationGroup, https response error StatusCode: 404, CacheClusterNotFound: Specified snapshotting cluster does not exist

   with module.app.module.redis.aws_elasticache_replication_group.default[0],
   on .terraform/modules/app.redis/main.tf line 135, in resource "aws_elasticache_replication_group" "default":
  135: resource "aws_elasticache_replication_group" "default" {

Terraform Configuration Files

  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "5.64.0"
    }
  }
  required_version = "1.5.7"
}

Steps to Reproduce

Make an elasticache cluster Add a replica node Delete node that has -001 suffix Update snapshot retention limit value Run terraform and see failure

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

Hack is documented here - I think the issue is pretty clearly stated, it's looking explicitly for -001.

Original issue here was closed: https://github.com/hashicorp/terraform-provider-aws/issues/1499

Would you like to implement a fix?

None

github-actions[bot] commented 6 days ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue