Skip to content

r/aws_elasticache_cluster: add configurable timeouts #41940

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

Merged
merged 1 commit into from
Mar 21, 2025

Conversation

jar-b
Copy link
Member

@jar-b jar-b commented Mar 20, 2025

Description

The registry documentation for the aws_elasticache_cluster resource already includes a Timeouts section, however, these were hardcoded into the Create, Update, and Delete methods and not configurable. This change adds configurable timeouts using the pre-existing hardcoded values, allowing practitioners to adjust the timeout values as needed (and as the registry documentation already implies).

References

Output from Acceptance Testing

% make testacc PKG=elasticache TESTS="TestAccElastiCacheCluster_" ACCTEST_PARALLELISM=10
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.7 test ./internal/service/elasticache/... -v -count 1 -parallel 10 -run='TestAccElastiCacheCluster_'  -timeout 360m -vet=off
2025/03/20 13:44:04 Initializing Terraform AWS Provider...

=== NAME  TestAccElastiCacheCluster_outpost_memcached
    cluster_test.go:1320: skipping since no Outposts found
--- SKIP: TestAccElastiCacheCluster_outpost_memcached (0.80s)
=== CONT  TestAccElastiCacheCluster_Redis_finalSnapshot
=== CONT  TestAccElastiCacheCluster_ReplicationGroupID_multipleReplica
--- PASS: TestAccElastiCacheCluster_NumCacheNodes_redis (2.83s)
--- PASS: TestAccElastiCacheCluster_Memcached_finalSnapshot (2.91s)
=== CONT  TestAccElastiCacheCluster_outpostID_memcached
    cluster_test.go:1400: skipping since no Outposts found
--- SKIP: TestAccElastiCacheCluster_outpostID_memcached (0.18s)
=== CONT  TestAccElastiCacheCluster_outpostID_redis
    cluster_test.go:1433: skipping since no Outposts found
--- SKIP: TestAccElastiCacheCluster_outpostID_redis (0.16s)
=== CONT  TestAccElastiCacheCluster_NodeTypeResize_redis
--- PASS: TestAccElastiCacheCluster_TransitEncryption (664.26s)
=== CONT  TestAccElastiCacheCluster_outpost_redis
    cluster_test.go:1360: skipping since no Outposts found
--- SKIP: TestAccElastiCacheCluster_outpost_redis (0.37s)
=== CONT  TestAccElastiCacheCluster_snapshotsWithUpdates
--- PASS: TestAccElastiCacheCluster_Engine_memcached (701.37s)
=== CONT  TestAccElastiCacheCluster_EngineVersion_memcached
--- PASS: TestAccElastiCacheCluster_Redis_autoMinorVersionUpgrade (741.18s)
=== CONT  TestAccElastiCacheCluster_AZMode_redis
--- PASS: TestAccElastiCacheCluster_Redis_finalSnapshot (926.29s)
=== CONT  TestAccElastiCacheCluster_AZMode_memcached
--- PASS: TestAccElastiCacheCluster_NodeTypeResize_memcached (1329.27s)
=== CONT  TestAccElastiCacheCluster_multiAZInVPC
--- PASS: TestAccElastiCacheCluster_snapshotsWithUpdates (746.31s)
=== CONT  TestAccElastiCacheCluster_vpc
--- PASS: TestAccElastiCacheCluster_AZMode_redis (687.70s)
=== CONT  TestAccElastiCacheCluster_NumCacheNodes_increaseWithPreferredAvailabilityZones
--- PASS: TestAccElastiCacheCluster_ReplicationGroupID_singleReplica (1553.48s)
=== CONT  TestAccElastiCacheCluster_tagWithOtherModification
--- PASS: TestAccElastiCacheCluster_ReplicationGroupID_availabilityZone (1553.57s)
=== CONT  TestAccElastiCacheCluster_tags
--- PASS: TestAccElastiCacheCluster_AZMode_memcached (657.97s)
=== CONT  TestAccElastiCacheCluster_Engine_Redis_LogDeliveryConfigurations
--- PASS: TestAccElastiCacheCluster_ReplicationGroupID_multipleReplica (1632.56s)
=== CONT  TestAccElastiCacheCluster_NumCacheNodes_decrease
--- PASS: TestAccElastiCacheCluster_NodeTypeResize_redis (1660.13s)
=== CONT  TestAccElastiCacheCluster_PortRedis_default
--- PASS: TestAccElastiCacheCluster_vpc (716.44s)
=== CONT  TestAccElastiCacheCluster_port
--- PASS: TestAccElastiCacheCluster_EngineVersion_memcached (1429.03s)
=== CONT  TestAccElastiCacheCluster_ipDiscovery
--- PASS: TestAccElastiCacheCluster_multiAZInVPC (893.01s)
=== CONT  TestAccElastiCacheCluster_ParameterGroupName_default
--- PASS: TestAccElastiCacheCluster_tags (675.42s)
=== CONT  TestAccElastiCacheCluster_Engine_redis_v5
--- PASS: TestAccElastiCacheCluster_PortRedis_default (646.85s)
=== CONT  TestAccElastiCacheCluster_Engine_None
--- PASS: TestAccElastiCacheCluster_Engine_None (0.80s)
=== CONT  TestAccElastiCacheCluster_disappears
--- PASS: TestAccElastiCacheCluster_NumCacheNodes_decrease (952.99s)
=== CONT  TestAccElastiCacheCluster_Engine_redis
--- PASS: TestAccElastiCacheCluster_NumCacheNodes_increaseWithPreferredAvailabilityZones (1268.32s)
=== CONT  TestAccElastiCacheCluster_ReplicationGroupID_transitEncryption
--- PASS: TestAccElastiCacheCluster_port (667.96s)
=== CONT  TestAccElastiCacheCluster_NumCacheNodes_increase
--- PASS: TestAccElastiCacheCluster_ipDiscovery (676.03s)
--- PASS: TestAccElastiCacheCluster_Engine_Redis_LogDeliveryConfigurations (1249.72s)
--- PASS: TestAccElastiCacheCluster_ParameterGroupName_default (656.93s)
--- PASS: TestAccElastiCacheCluster_Engine_redis_v5 (687.92s)
--- PASS: TestAccElastiCacheCluster_disappears (675.04s)
--- PASS: TestAccElastiCacheCluster_tagWithOtherModification (1598.06s)
--- PASS: TestAccElastiCacheCluster_Engine_redis (708.80s)
--- PASS: TestAccElastiCacheCluster_NumCacheNodes_increase (1400.32s)
--- PASS: TestAccElastiCacheCluster_ReplicationGroupID_transitEncryption (1593.31s)
--- PASS: TestAccElastiCacheCluster_EngineVersion_redis (4688.27s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/elasticache        4695.074s

@jar-b jar-b requested a review from a team as a code owner March 20, 2025 19:16
Copy link
Contributor

Community Guidelines

This comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀

Voting for Prioritization

  • Please vote on this Pull Request by adding a 👍 reaction to the original post to help the community and maintainers prioritize it.
  • Please see our prioritization guide for additional information on how the maintainers handle prioritization.
  • Please do not leave +1 or other comments that do not add relevant new information or questions; they generate extra noise for others following the Pull Request and do not help prioritize the request.

Pull Request Authors

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added service/elasticache Issues and PRs that pertain to the elasticache service. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. size/XS Managed by automation to categorize the size of a PR. labels Mar 20, 2025
The registry documentation for the `aws_elasticache_cluster` resource already includes a `Timeouts` section, however, these were hardcoded into the Create, Update, and Delete methods and not configurable. This change adds configurable timeouts using the pre-existing hardcoded values, allowing practitioners to adjust the timeout values as needed (and as the registry documentation already implies).

```console
% make testacc PKG=elasticache TESTS="TestAccElastiCacheCluster_" ACCTEST_PARALLELISM=10
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.7 test ./internal/service/elasticache/... -v -count 1 -parallel 10 -run='TestAccElastiCacheCluster_'  -timeout 360m -vet=off
2025/03/20 13:44:04 Initializing Terraform AWS Provider...

=== NAME  TestAccElastiCacheCluster_outpost_memcached
    cluster_test.go:1320: skipping since no Outposts found
--- SKIP: TestAccElastiCacheCluster_outpost_memcached (0.80s)
=== CONT  TestAccElastiCacheCluster_Redis_finalSnapshot
=== CONT  TestAccElastiCacheCluster_ReplicationGroupID_multipleReplica
--- PASS: TestAccElastiCacheCluster_NumCacheNodes_redis (2.83s)
--- PASS: TestAccElastiCacheCluster_Memcached_finalSnapshot (2.91s)
=== CONT  TestAccElastiCacheCluster_outpostID_memcached
    cluster_test.go:1400: skipping since no Outposts found
--- SKIP: TestAccElastiCacheCluster_outpostID_memcached (0.18s)
=== CONT  TestAccElastiCacheCluster_outpostID_redis
    cluster_test.go:1433: skipping since no Outposts found
--- SKIP: TestAccElastiCacheCluster_outpostID_redis (0.16s)
=== CONT  TestAccElastiCacheCluster_NodeTypeResize_redis
--- PASS: TestAccElastiCacheCluster_TransitEncryption (664.26s)
=== CONT  TestAccElastiCacheCluster_outpost_redis
    cluster_test.go:1360: skipping since no Outposts found
--- SKIP: TestAccElastiCacheCluster_outpost_redis (0.37s)
=== CONT  TestAccElastiCacheCluster_snapshotsWithUpdates
--- PASS: TestAccElastiCacheCluster_Engine_memcached (701.37s)
=== CONT  TestAccElastiCacheCluster_EngineVersion_memcached
--- PASS: TestAccElastiCacheCluster_Redis_autoMinorVersionUpgrade (741.18s)
=== CONT  TestAccElastiCacheCluster_AZMode_redis
--- PASS: TestAccElastiCacheCluster_Redis_finalSnapshot (926.29s)
=== CONT  TestAccElastiCacheCluster_AZMode_memcached
--- PASS: TestAccElastiCacheCluster_NodeTypeResize_memcached (1329.27s)
=== CONT  TestAccElastiCacheCluster_multiAZInVPC
--- PASS: TestAccElastiCacheCluster_snapshotsWithUpdates (746.31s)
=== CONT  TestAccElastiCacheCluster_vpc
--- PASS: TestAccElastiCacheCluster_AZMode_redis (687.70s)
=== CONT  TestAccElastiCacheCluster_NumCacheNodes_increaseWithPreferredAvailabilityZones
--- PASS: TestAccElastiCacheCluster_ReplicationGroupID_singleReplica (1553.48s)
=== CONT  TestAccElastiCacheCluster_tagWithOtherModification
--- PASS: TestAccElastiCacheCluster_ReplicationGroupID_availabilityZone (1553.57s)
=== CONT  TestAccElastiCacheCluster_tags
--- PASS: TestAccElastiCacheCluster_AZMode_memcached (657.97s)
=== CONT  TestAccElastiCacheCluster_Engine_Redis_LogDeliveryConfigurations
--- PASS: TestAccElastiCacheCluster_ReplicationGroupID_multipleReplica (1632.56s)
=== CONT  TestAccElastiCacheCluster_NumCacheNodes_decrease
--- PASS: TestAccElastiCacheCluster_NodeTypeResize_redis (1660.13s)
=== CONT  TestAccElastiCacheCluster_PortRedis_default
--- PASS: TestAccElastiCacheCluster_vpc (716.44s)
=== CONT  TestAccElastiCacheCluster_port
--- PASS: TestAccElastiCacheCluster_EngineVersion_memcached (1429.03s)
=== CONT  TestAccElastiCacheCluster_ipDiscovery
--- PASS: TestAccElastiCacheCluster_multiAZInVPC (893.01s)
=== CONT  TestAccElastiCacheCluster_ParameterGroupName_default
--- PASS: TestAccElastiCacheCluster_tags (675.42s)
=== CONT  TestAccElastiCacheCluster_Engine_redis_v5
--- PASS: TestAccElastiCacheCluster_PortRedis_default (646.85s)
=== CONT  TestAccElastiCacheCluster_Engine_None
--- PASS: TestAccElastiCacheCluster_Engine_None (0.80s)
=== CONT  TestAccElastiCacheCluster_disappears
--- PASS: TestAccElastiCacheCluster_NumCacheNodes_decrease (952.99s)
=== CONT  TestAccElastiCacheCluster_Engine_redis
--- PASS: TestAccElastiCacheCluster_NumCacheNodes_increaseWithPreferredAvailabilityZones (1268.32s)
=== CONT  TestAccElastiCacheCluster_ReplicationGroupID_transitEncryption
--- PASS: TestAccElastiCacheCluster_port (667.96s)
=== CONT  TestAccElastiCacheCluster_NumCacheNodes_increase
--- PASS: TestAccElastiCacheCluster_ipDiscovery (676.03s)
--- PASS: TestAccElastiCacheCluster_Engine_Redis_LogDeliveryConfigurations (1249.72s)
--- PASS: TestAccElastiCacheCluster_ParameterGroupName_default (656.93s)
--- PASS: TestAccElastiCacheCluster_Engine_redis_v5 (687.92s)
--- PASS: TestAccElastiCacheCluster_disappears (675.04s)
--- PASS: TestAccElastiCacheCluster_tagWithOtherModification (1598.06s)
--- PASS: TestAccElastiCacheCluster_Engine_redis (708.80s)
--- PASS: TestAccElastiCacheCluster_NumCacheNodes_increase (1400.32s)
--- PASS: TestAccElastiCacheCluster_ReplicationGroupID_transitEncryption (1593.31s)
--- PASS: TestAccElastiCacheCluster_EngineVersion_redis (4688.27s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/elasticache        4695.074s
```
@jar-b jar-b force-pushed the f-elasticache_cluster-timeouts branch from 3ae2bf4 to 9608087 Compare March 20, 2025 19:18
Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀.

@jar-b jar-b merged commit 03d16a6 into main Mar 21, 2025
34 checks passed
@jar-b jar-b deleted the f-elasticache_cluster-timeouts branch March 21, 2025 15:12
Copy link
Contributor

Warning

This Issue has been closed, meaning that any additional comments are much easier for the maintainers to miss. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.

@github-actions github-actions bot added this to the v5.93.0 milestone Mar 21, 2025
terraform-aws-provider bot pushed a commit that referenced this pull request Mar 21, 2025
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Mar 27, 2025
Copy link
Contributor

This functionality has been released in v5.93.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!

Copy link
Contributor

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.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/elasticache Issues and PRs that pertain to the elasticache service. size/XS Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants