-
Notifications
You must be signed in to change notification settings - Fork 9.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
r/aws_elasticache_replication_group: Use configured Delete timeout during resource Delete #37182
Conversation
When adding extra nodes to an elasticache_replication_group, we saw the error: ``` Error: modifying ElastiCache Replication Group (csbb2a2560a-acf7-4106-9618-4263082cb536) clusters: error waiting for ElastiCache Replication Group (csbb2a2560a-acf7-4106-9618-4263082cb536) replica addition: unexpected state 'snapshotting', wanted target 'available'. last error: %!s(<nil>) with aws_elasticache_replication_group.redis, on main.tf line 46, in resource "aws_elasticache_replication_group" "redis": 46: resource "aws_elasticache_replication_group" "redis" ``` Looks like a snapshot occurred while waiting for the scale up. I see that "snapshotting" is an allowed state in the `WaitReplicationGroupAvailable()` function, so for consistency it makes sense for it to also be allowed in the `WaitReplicationGroupMemberClustersAvailable()` function. Testing: tests of this functionality don't seem to go into this level of detail, so no tests were modified.
When scaling in (i.e. reducing node count), apply change _after_ making other modifications. This avoid an invalid parameter error in certain conditions, e.g. if reducing from 2 to 1 while also disabling multi_az_enabled and/or automatic_failover_enabled, the configuration has to be applied before reducing node count (otherwise an error like 'InvalidParameterValue: Must have at least 1 replica for Multi-AZ enabled Replication Group' is generated To avoid issues in the other direction, continue to apply scale _out_s prior to other modifications
% make testacc TESTARGS='-run=TestAccElastiCacheServerlessCache_basic' PKG=elasticache ==> Checking that code complies with gofmt requirements... TF_ACC=1 go1.22.2 test ./internal/service/elasticache/... -v -count 1 -parallel 20 -run=TestAccElastiCacheServerlessCache_basic -timeout 360m === RUN TestAccElastiCacheServerlessCache_basic === PAUSE TestAccElastiCacheServerlessCache_basic === RUN TestAccElastiCacheServerlessCache_basicRedis === PAUSE TestAccElastiCacheServerlessCache_basicRedis === CONT TestAccElastiCacheServerlessCache_basic === CONT TestAccElastiCacheServerlessCache_basicRedis --- PASS: TestAccElastiCacheServerlessCache_basic (311.86s) --- PASS: TestAccElastiCacheServerlessCache_basicRedis (364.10s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/elasticache 374.957s
# Conflicts: # internal/service/elasticache/cluster.go # internal/service/elasticache/replication_group.go
…t when detaching from any global replication group.
Community NoteVoting for Prioritization
For Submitters
|
Thank you for your contribution! 🚀 A new usage of AWS SDK for Go V1 was detected. Please prefer AWS SDK for Go V2 for all net-new services. If this is an enhancement or bug fix to an existing AWS SDK Go V1 based resource, this comment can be safely ignored. For additional information refer to the AWS SDK for Go Versions page in the contributor guide. |
This functionality has been released in v5.48.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Description
Use the configured
Delete
timeout during resource delete, especially when disassociating ElastiCache Replication Groups from Global Replication Groups.Relations
Closes #37121.
Closes #34819.
Closes #30493.
Output from Acceptance Testing