Skip to content
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

resource/aws_elasticache_replication_group: Allow changing replica count in cluster-mode #17301

Merged
merged 5 commits into from
Jan 28, 2021

Conversation

gdavison
Copy link
Contributor

Currently, changing the value of cluster_mode.replicas_per_node_group forces re-creation of the Replication Group. The AWS API provides calls to change the number of replicas, so this can be changed in-place.

Closes #6184

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSElasticacheReplicationGroup_'

--- PASS: TestAccAWSElasticacheReplicationGroup_clusteringAndCacheNodesCausesError (73.87s)
--- PASS: TestAccAWSElasticacheReplicationGroup_ClusterMode_NonClusteredParameterGroup (801.80s)
--- PASS: TestAccAWSElasticacheReplicationGroup_multiAzInVpc (1034.80s)
--- PASS: TestAccAWSElasticacheReplicationGroup_enableAuthTokenTransitEncryption (1200.39s)
--- PASS: TestAccAWSElasticacheReplicationGroup_enableAtRestEncryption (1223.13s)
--- PASS: TestAccAWSElasticacheReplicationGroup_enableSnapshotting (1393.69s)
--- PASS: TestAccAWSElasticacheReplicationGroup_useCmkKmsKeyId (1648.87s)
--- PASS: TestAccAWSElasticacheReplicationGroup_basic (1768.73s)
--- PASS: TestAccAWSElasticacheReplicationGroup_ClusterMode_Basic (1695.39s)
--- PASS: TestAccAWSElasticacheReplicationGroup_FinalSnapshot (1970.25s)
--- PASS: TestAccAWSElasticacheReplicationGroup_NumberCacheClusters_Failover_AutoFailoverEnabled (1975.03s)
--- PASS: TestAccAWSElasticacheReplicationGroup_NumberCacheClusters_Basic (2041.43s)
--- PASS: TestAccAWSElasticacheReplicationGroup_ClusterMode_UpdateReplicasPerNodeGroup (2074.42s)
--- PASS: TestAccAWSElasticacheReplicationGroup_updateParameterGroup (2219.32s)
--- PASS: TestAccAWSElasticacheReplicationGroup_ClusterMode_UpdateNumNodeGroups_ScaleUp (2221.82s)
--- PASS: TestAccAWSElasticacheReplicationGroup_tags (2295.26s)
--- PASS: TestAccAWSElasticacheReplicationGroup_updateDescription (1540.29s)
--- PASS: TestAccAWSElasticacheReplicationGroup_updateMaintenanceWindow (1313.53s)
--- PASS: TestAccAWSElasticacheReplicationGroup_ClusterMode_UpdateNumNodeGroups_ScaleDown (2365.70s)
--- PASS: TestAccAWSElasticacheReplicationGroup_Uppercase (1169.19s)
--- PASS: TestAccAWSElasticacheReplicationGroup_NumberCacheClusters_Failover_AutoFailoverDisabled (2414.04s)
--- PASS: TestAccAWSElasticacheReplicationGroup_vpc (2696.39s)
--- PASS: TestAccAWSElasticacheReplicationGroup_redisClusterInVpc2 (1514.30s)
--- PASS: TestAccAWSElasticacheReplicationGroup_updateNodeSize (3263.00s)
--- PASS: TestAccAWSElasticacheReplicationGroup_ClusterMode_UpdateNumNodeGroupsAndReplicasPerNodeGroup (5971.54s)

@gdavison gdavison requested a review from a team as a code owner January 27, 2021 05:06
@ghost ghost added size/L Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. service/elasticache Issues and PRs that pertain to the elasticache service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Jan 27, 2021
@bflad bflad self-assigned this Jan 27, 2021
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

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

Nice, looks good to me 🚀

Output from acceptance testing in AWS Commercial:

--- PASS: TestAccAWSElasticacheReplicationGroup_basic (820.04s)
--- PASS: TestAccAWSElasticacheReplicationGroup_clusteringAndCacheNodesCausesError (9.94s)
--- PASS: TestAccAWSElasticacheReplicationGroup_ClusterMode_Basic (2188.72s)
--- PASS: TestAccAWSElasticacheReplicationGroup_ClusterMode_NonClusteredParameterGroup (739.68s)
--- PASS: TestAccAWSElasticacheReplicationGroup_ClusterMode_UpdateNumNodeGroups_ScaleDown (2194.88s)
--- PASS: TestAccAWSElasticacheReplicationGroup_ClusterMode_UpdateNumNodeGroups_ScaleUp (2125.01s)
--- PASS: TestAccAWSElasticacheReplicationGroup_ClusterMode_UpdateNumNodeGroupsAndReplicasPerNodeGroup (5650.08s)
--- PASS: TestAccAWSElasticacheReplicationGroup_ClusterMode_UpdateReplicasPerNodeGroup (2930.78s)
--- PASS: TestAccAWSElasticacheReplicationGroup_enableAtRestEncryption (1492.55s)
--- PASS: TestAccAWSElasticacheReplicationGroup_enableAuthTokenTransitEncryption (1431.68s)
--- PASS: TestAccAWSElasticacheReplicationGroup_enableSnapshotting (1281.80s)
--- PASS: TestAccAWSElasticacheReplicationGroup_FinalSnapshot (1514.78s)
--- PASS: TestAccAWSElasticacheReplicationGroup_multiAzInVpc (1763.70s)
--- PASS: TestAccAWSElasticacheReplicationGroup_NumberCacheClusters_Basic (2637.20s)
--- PASS: TestAccAWSElasticacheReplicationGroup_NumberCacheClusters_Failover_AutoFailoverDisabled (1704.80s)
--- PASS: TestAccAWSElasticacheReplicationGroup_NumberCacheClusters_Failover_AutoFailoverEnabled (2379.63s)
--- PASS: TestAccAWSElasticacheReplicationGroup_redisClusterInVpc2 (1611.81s)
--- PASS: TestAccAWSElasticacheReplicationGroup_tags (1569.59s)
--- PASS: TestAccAWSElasticacheReplicationGroup_updateDescription (1342.84s)
--- PASS: TestAccAWSElasticacheReplicationGroup_updateMaintenanceWindow (1150.44s)
--- PASS: TestAccAWSElasticacheReplicationGroup_updateNodeSize (3656.16s)
--- PASS: TestAccAWSElasticacheReplicationGroup_updateParameterGroup (1282.73s)
--- PASS: TestAccAWSElasticacheReplicationGroup_Uppercase (631.39s)
--- PASS: TestAccAWSElasticacheReplicationGroup_useCmkKmsKeyId (1113.49s)
--- PASS: TestAccAWSElasticacheReplicationGroup_vpc (1924.84s)

Output from acceptance testing in AWS GovCloud (US):

--- FAIL: TestAccAWSElasticacheReplicationGroup_useCmkKmsKeyId (6.06s) # https://github.com/hashicorp/terraform-provider-aws/issues/17224
--- PASS: TestAccAWSElasticacheReplicationGroup_basic (1882.69s)
--- PASS: TestAccAWSElasticacheReplicationGroup_clusteringAndCacheNodesCausesError (1.22s)
--- PASS: TestAccAWSElasticacheReplicationGroup_ClusterMode_Basic (1393.30s)
--- PASS: TestAccAWSElasticacheReplicationGroup_ClusterMode_NonClusteredParameterGroup (2045.05s)
--- PASS: TestAccAWSElasticacheReplicationGroup_ClusterMode_UpdateNumNodeGroups_ScaleDown (2205.11s)
--- PASS: TestAccAWSElasticacheReplicationGroup_ClusterMode_UpdateNumNodeGroups_ScaleUp (2184.69s)
--- PASS: TestAccAWSElasticacheReplicationGroup_ClusterMode_UpdateNumNodeGroupsAndReplicasPerNodeGroup (4439.25s)
--- PASS: TestAccAWSElasticacheReplicationGroup_ClusterMode_UpdateReplicasPerNodeGroup (2203.41s)
--- PASS: TestAccAWSElasticacheReplicationGroup_enableAtRestEncryption (775.91s)
--- PASS: TestAccAWSElasticacheReplicationGroup_enableAuthTokenTransitEncryption (786.46s)
--- PASS: TestAccAWSElasticacheReplicationGroup_enableSnapshotting (1231.19s)
--- PASS: TestAccAWSElasticacheReplicationGroup_FinalSnapshot (1104.22s)
--- PASS: TestAccAWSElasticacheReplicationGroup_multiAzInVpc (1274.56s)
--- PASS: TestAccAWSElasticacheReplicationGroup_NumberCacheClusters_Basic (1494.56s)
--- PASS: TestAccAWSElasticacheReplicationGroup_NumberCacheClusters_Failover_AutoFailoverDisabled (1468.00s)
--- PASS: TestAccAWSElasticacheReplicationGroup_NumberCacheClusters_Failover_AutoFailoverEnabled (1819.32s)
--- PASS: TestAccAWSElasticacheReplicationGroup_redisClusterInVpc2 (1273.54s)
--- PASS: TestAccAWSElasticacheReplicationGroup_tags (883.23s)
--- PASS: TestAccAWSElasticacheReplicationGroup_updateDescription (832.36s)
--- PASS: TestAccAWSElasticacheReplicationGroup_updateMaintenanceWindow (972.46s)
--- PASS: TestAccAWSElasticacheReplicationGroup_updateNodeSize (1829.53s)
--- PASS: TestAccAWSElasticacheReplicationGroup_updateParameterGroup (2342.55s)
--- PASS: TestAccAWSElasticacheReplicationGroup_Uppercase (548.14s)
--- PASS: TestAccAWSElasticacheReplicationGroup_vpc (1686.96s)

.changelog/17301.txt Outdated Show resolved Hide resolved
@gdavison gdavison merged commit 90a7313 into main Jan 28, 2021
@gdavison gdavison deleted the elasticache-replication-group-scale-replicas branch January 28, 2021 21:32
@github-actions github-actions bot added this to the v3.26.0 milestone Jan 28, 2021
github-actions bot pushed a commit that referenced this pull request Jan 28, 2021
@ghost
Copy link

ghost commented Jan 28, 2021

This has been released in version 3.26.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 for triage. Thanks!

@ghost
Copy link

ghost commented Feb 28, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Feb 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. service/elasticache Issues and PRs that pertain to the elasticache service. size/L Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws_elasticache_replication_group always recreates when changing replicas_per_node_group
2 participants