-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
memorydb: add new multi_region_cluster
resource
#40376
memorydb: add new multi_region_cluster
resource
#40376
Conversation
Community NoteVoting for Prioritization
For Submitters
|
FYI - its merged now #40380 |
DescribeMultiRegionClusters does not return the suffix argument. Since suffix is required, this conflicts when testing the import.
```console % make testacc PKG=memorydb TESTS="TestAccMemoryDBCluster_multiRegionClusterName" make: Verifying source code with gofmt... ==> Checking that code complies with gofmt requirements... TF_ACC=1 go1.23.3 test ./internal/service/memorydb/... -v -count 1 -parallel 20 -run='TestAccMemoryDBCluster_multiRegionClusterName' -timeout 360m 2024/12/16 14:24:29 Initializing Terraform AWS Provider... --- PASS: TestAccMemoryDBCluster_multiRegionClusterName (1932.43s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/memorydb 1937.485s ```
The `Update` API only allows one of node type, shard configuration, or parameter group name to be updated in a single request. The provider will now serialize update requests in the case where more than one of these arguments are modified during a single apply. ```console % make testacc PKG=memorydb TESTS="TestAccMemoryDBMultiRegionCluster_" make: Verifying source code with gofmt... ==> Checking that code complies with gofmt requirements... TF_ACC=1 go1.23.3 test ./internal/service/memorydb/... -v -count 1 -parallel 20 -run='Tes 2024/12/16 16:52:20 Initializing Terraform AWS Provider... --- PASS: TestAccMemoryDBMultiRegionCluster_engineVersion (88.78s) --- PASS: TestAccMemoryDBMultiRegionCluster_defaults (89.07s) --- PASS: TestAccMemoryDBMultiRegionCluster_description (89.07s) --- PASS: TestAccMemoryDBMultiRegionCluster_parameterGroup (89.07s) --- PASS: TestAccMemoryDBMultiRegionCluster_tlsEnabled (89.07s) --- PASS: TestAccMemoryDBMultiRegionCluster_engine (89.09s) --- PASS: TestAccMemoryDBMultiRegionCluster_basic (89.11s) --- PASS: TestAccMemoryDBMultiRegionCluster_tags (108.07s) --- PASS: TestAccMemoryDBMultiRegionCluster_numShards (152.33s) --- PASS: TestAccMemoryDBMultiRegionCluster_nodeType (161.55s) --- PASS: TestAccMemoryDBMultiRegionCluster_updateStrategy (188.85s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/memorydb 194.018s ```
Also simplifies acceptance test configurations and merges the `defaults` test case with `basic`. ```console % make testacc PKG=memorydb TESTS="TestAccMemoryDBMultiRegionCluster_" make: Verifying source code with gofmt... ==> Checking that code complies with gofmt requirements... TF_ACC=1 go1.23.3 test ./internal/service/memorydb/... -v -count 1 -parallel 20 -run='TestAccMemoryDBMultiRegionCluster_' -timeout 360m 2024/12/17 13:10:16 Initializing Terraform AWS Provider... --- PASS: TestAccMemoryDBMultiRegionCluster_disappears (56.94s) --- PASS: TestAccMemoryDBMultiRegionCluster_basic (66.06s) --- PASS: TestAccMemoryDBMultiRegionCluster_engine (66.08s) --- PASS: TestAccMemoryDBMultiRegionCluster_engineVersion (66.10s) --- PASS: TestAccMemoryDBMultiRegionCluster_tlsEnabled (66.10s) --- PASS: TestAccMemoryDBMultiRegionCluster_description (66.10s) --- PASS: TestAccMemoryDBMultiRegionCluster_parameterGroup (66.10s) --- PASS: TestAccMemoryDBMultiRegionCluster_tags (82.06s) --- PASS: TestAccMemoryDBMultiRegionCluster_numShards (115.65s) --- PASS: TestAccMemoryDBMultiRegionCluster_nodeType (116.70s) --- PASS: TestAccMemoryDBMultiRegionCluster_updateStrategy (164.88s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/memorydb 170.051s ```
…_enabled` The argument is now changed to optional and computed to allow for the default value to be configured by AWS when omitted, rather than set explicitly to a hardcoded value in the provider. ```console % make testacc PKG=memorydb TESTS="TestAccMemoryDBMultiRegionCluster_" make: Verifying source code with gofmt... ==> Checking that code complies with gofmt requirements... TF_ACC=1 go1.23.3 test ./internal/service/memorydb/... -v -count 1 -parallel 20 -run='TestAccMemoryDBMultiRegionCluster_' -timeout 360m 2024/12/17 13:24:43 Initializing Terraform AWS Provider... --- PASS: TestAccMemoryDBMultiRegionCluster_disappears (57.02s) --- PASS: TestAccMemoryDBMultiRegionCluster_parameterGroup (65.62s) --- PASS: TestAccMemoryDBMultiRegionCluster_description (66.54s) --- PASS: TestAccMemoryDBMultiRegionCluster_engineVersion (66.80s) --- PASS: TestAccMemoryDBMultiRegionCluster_basic (66.90s) --- PASS: TestAccMemoryDBMultiRegionCluster_engine (66.97s) --- PASS: TestAccMemoryDBMultiRegionCluster_tags (88.16s) --- PASS: TestAccMemoryDBMultiRegionCluster_numShards (116.65s) --- PASS: TestAccMemoryDBMultiRegionCluster_tlsEnabled (117.55s) --- PASS: TestAccMemoryDBMultiRegionCluster_nodeType (122.02s) --- PASS: TestAccMemoryDBMultiRegionCluster_updateStrategy (165.72s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/memorydb 171.075s ```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎉
% make testacc PKG=memorydb TESTS="TestAccMemoryDBMultiRegionCluster_"
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/memorydb/... -v -count 1 -parallel 20 -run='TestAccMemoryDBMultiRegionCluster_' -timeout 360m
2024/12/17 13:24:43 Initializing Terraform AWS Provider...
--- PASS: TestAccMemoryDBMultiRegionCluster_disappears (57.02s)
--- PASS: TestAccMemoryDBMultiRegionCluster_parameterGroup (65.62s)
--- PASS: TestAccMemoryDBMultiRegionCluster_description (66.54s)
--- PASS: TestAccMemoryDBMultiRegionCluster_engineVersion (66.80s)
--- PASS: TestAccMemoryDBMultiRegionCluster_basic (66.90s)
--- PASS: TestAccMemoryDBMultiRegionCluster_engine (66.97s)
--- PASS: TestAccMemoryDBMultiRegionCluster_tags (88.16s)
--- PASS: TestAccMemoryDBMultiRegionCluster_numShards (116.65s)
--- PASS: TestAccMemoryDBMultiRegionCluster_tlsEnabled (117.55s)
--- PASS: TestAccMemoryDBMultiRegionCluster_nodeType (122.02s)
--- PASS: TestAccMemoryDBMultiRegionCluster_updateStrategy (165.72s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/memorydb 171.075s
Thanks for your contribution, @bschaatsbergen! 🚀 |
The `multi_region_cluster_name` attribute will be used for import and read operations, aligning with the primary identifer used by the AWS API. ```console % make testacc PKG=memorydb TESTS="TestAccMemoryDBMultiRegionCluster_" make: Verifying source code with gofmt... ==> Checking that code complies with gofmt requirements... TF_ACC=1 go1.23.3 test ./internal/service/memorydb/... -v -count 1 -parallel 20 -run='TestAccMemoryDBMultiRegionCluster_' -timeout 360m 2024/12/18 09:13:35 Initializing Terraform AWS Provider... --- PASS: TestAccMemoryDBMultiRegionCluster_disappears (57.86s) --- PASS: TestAccMemoryDBMultiRegionCluster_parameterGroup (66.57s) --- PASS: TestAccMemoryDBMultiRegionCluster_basic (67.35s) --- PASS: TestAccMemoryDBMultiRegionCluster_engineVersion (67.36s) --- PASS: TestAccMemoryDBMultiRegionCluster_description (67.37s) --- PASS: TestAccMemoryDBMultiRegionCluster_engine (67.47s) --- PASS: TestAccMemoryDBMultiRegionCluster_tags (83.31s) --- PASS: TestAccMemoryDBMultiRegionCluster_numShards (116.48s) --- PASS: TestAccMemoryDBMultiRegionCluster_nodeType (118.62s) --- PASS: TestAccMemoryDBMultiRegionCluster_tlsEnabled (118.65s) --- PASS: TestAccMemoryDBMultiRegionCluster_updateStrategy (165.98s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/memorydb 175.713s ```
Acceptance test results after removing the % make testacc PKG=memorydb TESTS="TestAccMemoryDBMultiRegionCluster_"
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/memorydb/... -v -count 1 -parallel 20 -run='TestAccMemoryDBMultiRegionCluster_' -timeout 360m
2024/12/18 09:13:35 Initializing Terraform AWS Provider...
--- PASS: TestAccMemoryDBMultiRegionCluster_disappears (57.86s)
--- PASS: TestAccMemoryDBMultiRegionCluster_parameterGroup (66.57s)
--- PASS: TestAccMemoryDBMultiRegionCluster_basic (67.35s)
--- PASS: TestAccMemoryDBMultiRegionCluster_engineVersion (67.36s)
--- PASS: TestAccMemoryDBMultiRegionCluster_description (67.37s)
--- PASS: TestAccMemoryDBMultiRegionCluster_engine (67.47s)
--- PASS: TestAccMemoryDBMultiRegionCluster_tags (83.31s)
--- PASS: TestAccMemoryDBMultiRegionCluster_numShards (116.48s)
--- PASS: TestAccMemoryDBMultiRegionCluster_nodeType (118.62s)
--- PASS: TestAccMemoryDBMultiRegionCluster_tlsEnabled (118.65s)
--- PASS: TestAccMemoryDBMultiRegionCluster_updateStrategy (165.98s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/memorydb 175.713s |
@jar-b one last suggestion to guard against partial failures. Otherwise, LGTM 🚀 % make testacc PKG=memorydb TESTS="TestAccMemoryDBMultiRegionCluster_"
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/memorydb/... -v -count 1 -parallel 20 -run='TestAccMemoryDBMultiRegionCluster_' -timeout 360m
2024/12/18 09:25:22 Initializing Terraform AWS Provider...
--- PASS: TestAccMemoryDBMultiRegionCluster_disappears (58.12s)
--- PASS: TestAccMemoryDBMultiRegionCluster_engine (64.57s)
--- PASS: TestAccMemoryDBMultiRegionCluster_description (65.04s)
--- PASS: TestAccMemoryDBMultiRegionCluster_engineVersion (66.29s)
--- PASS: TestAccMemoryDBMultiRegionCluster_basic (66.68s)
--- PASS: TestAccMemoryDBMultiRegionCluster_parameterGroup (66.70s)
--- PASS: TestAccMemoryDBMultiRegionCluster_tags (83.94s)
--- PASS: TestAccMemoryDBMultiRegionCluster_tlsEnabled (117.03s)
--- PASS: TestAccMemoryDBMultiRegionCluster_nodeType (118.05s)
--- PASS: TestAccMemoryDBMultiRegionCluster_numShards (130.49s)
--- PASS: TestAccMemoryDBMultiRegionCluster_updateStrategy (168.39s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/memorydb 179.548s |
Set a partial state so that this resource taints if the waiter fails. Co-authored-by: Adrian Johnson <[email protected]>
Tests after the latest changes. % make testacc PKG=memorydb TESTS="TestAccMemoryDBMultiRegionCluster_"
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/memorydb/... -v -count 1 -parallel 20 -run='TestAccMemoryDBMultiRegionCluster_' -timeout 360m
2024/12/18 10:34:20 Initializing Terraform AWS Provider...
--- PASS: TestAccMemoryDBMultiRegionCluster_disappears (58.14s)
--- PASS: TestAccMemoryDBMultiRegionCluster_description (66.38s)
--- PASS: TestAccMemoryDBMultiRegionCluster_parameterGroup (67.13s)
--- PASS: TestAccMemoryDBMultiRegionCluster_engineVersion (67.15s)
--- PASS: TestAccMemoryDBMultiRegionCluster_engine (67.24s)
--- PASS: TestAccMemoryDBMultiRegionCluster_basic (67.24s)
--- PASS: TestAccMemoryDBMultiRegionCluster_tags (82.74s)
--- PASS: TestAccMemoryDBMultiRegionCluster_numShards (117.22s)
--- PASS: TestAccMemoryDBMultiRegionCluster_tlsEnabled (118.25s)
--- PASS: TestAccMemoryDBMultiRegionCluster_nodeType (118.27s)
--- PASS: TestAccMemoryDBMultiRegionCluster_updateStrategy (166.07s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/memorydb 172.545s |
This functionality has been released in v5.82.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! |
Closes #40374