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

aws_memorydb_cluster: add data_tiering attribute and allow more than one snapshot ARN #28022

Merged

Conversation

roberth-k
Copy link
Contributor

Description

Relations

Closes #25780

References

Output from Acceptance Testing

$ make testacc TESTS=TestAccMemoryDBCluster_ PKG=memorydb ACCTEST_TIMEOUT=600m ACCTEST_PARALLELISM=5
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/memorydb/... -v -count 1 -parallel 5 -run='TestAccMemoryDBCluster_'  -timeout 600m
=== RUN   TestAccMemoryDBCluster_basic
=== PAUSE TestAccMemoryDBCluster_basic
=== RUN   TestAccMemoryDBCluster_defaults
=== PAUSE TestAccMemoryDBCluster_defaults
=== RUN   TestAccMemoryDBCluster_disappears
=== PAUSE TestAccMemoryDBCluster_disappears
=== RUN   TestAccMemoryDBCluster_nameGenerated
=== PAUSE TestAccMemoryDBCluster_nameGenerated
=== RUN   TestAccMemoryDBCluster_namePrefix
=== PAUSE TestAccMemoryDBCluster_namePrefix
=== RUN   TestAccMemoryDBCluster_create_noTLS
=== PAUSE TestAccMemoryDBCluster_create_noTLS
=== RUN   TestAccMemoryDBCluster_create_withDataTiering
=== PAUSE TestAccMemoryDBCluster_create_withDataTiering
=== RUN   TestAccMemoryDBCluster_create_withKMS
=== PAUSE TestAccMemoryDBCluster_create_withKMS
=== RUN   TestAccMemoryDBCluster_create_withPort
=== PAUSE TestAccMemoryDBCluster_create_withPort
=== RUN   TestAccMemoryDBCluster_create_fromSnapshot
=== PAUSE TestAccMemoryDBCluster_create_fromSnapshot
=== RUN   TestAccMemoryDBCluster_delete_withFinalSnapshot
=== PAUSE TestAccMemoryDBCluster_delete_withFinalSnapshot
=== RUN   TestAccMemoryDBCluster_Update_aclName
=== PAUSE TestAccMemoryDBCluster_Update_aclName
=== RUN   TestAccMemoryDBCluster_Update_description
=== PAUSE TestAccMemoryDBCluster_Update_description
=== RUN   TestAccMemoryDBCluster_Update_engineVersion
=== PAUSE TestAccMemoryDBCluster_Update_engineVersion
=== RUN   TestAccMemoryDBCluster_Update_maintenanceWindow
=== PAUSE TestAccMemoryDBCluster_Update_maintenanceWindow
=== RUN   TestAccMemoryDBCluster_Update_nodeType
=== PAUSE TestAccMemoryDBCluster_Update_nodeType
=== RUN   TestAccMemoryDBCluster_Update_numShards_scaleUp
=== PAUSE TestAccMemoryDBCluster_Update_numShards_scaleUp
=== RUN   TestAccMemoryDBCluster_Update_numShards_scaleDown
=== PAUSE TestAccMemoryDBCluster_Update_numShards_scaleDown
=== RUN   TestAccMemoryDBCluster_Update_numReplicasPerShard_scaleUp
=== PAUSE TestAccMemoryDBCluster_Update_numReplicasPerShard_scaleUp
=== RUN   TestAccMemoryDBCluster_Update_numReplicasPerShard_scaleDown
=== PAUSE TestAccMemoryDBCluster_Update_numReplicasPerShard_scaleDown
=== RUN   TestAccMemoryDBCluster_Update_parameterGroup
=== PAUSE TestAccMemoryDBCluster_Update_parameterGroup
=== RUN   TestAccMemoryDBCluster_Update_securityGroupIds
=== PAUSE TestAccMemoryDBCluster_Update_securityGroupIds
=== RUN   TestAccMemoryDBCluster_Update_snapshotRetentionLimit
=== PAUSE TestAccMemoryDBCluster_Update_snapshotRetentionLimit
=== RUN   TestAccMemoryDBCluster_Update_snapshotWindow
=== PAUSE TestAccMemoryDBCluster_Update_snapshotWindow
=== RUN   TestAccMemoryDBCluster_Update_snsTopicARN
=== PAUSE TestAccMemoryDBCluster_Update_snsTopicARN
=== RUN   TestAccMemoryDBCluster_Update_tags
=== PAUSE TestAccMemoryDBCluster_Update_tags
=== CONT  TestAccMemoryDBCluster_basic
=== CONT  TestAccMemoryDBCluster_Update_engineVersion
=== CONT  TestAccMemoryDBCluster_Update_parameterGroup
=== CONT  TestAccMemoryDBCluster_Update_numShards_scaleDown
=== CONT  TestAccMemoryDBCluster_create_withKMS
--- PASS: TestAccMemoryDBCluster_create_withKMS (815.33s)
=== CONT  TestAccMemoryDBCluster_Update_description
--- PASS: TestAccMemoryDBCluster_Update_engineVersion (815.59s)
=== CONT  TestAccMemoryDBCluster_Update_aclName
    cluster_test.go:373: Step 1/4 error: Error running apply: exit status 1

        Error: error creating MemoryDB Cluster (tf-test-6aighuv2): RequestError: send request failed
        caused by: Post "https://memory-db.eu-west-1.amazonaws.com/": read tcp 192.168.1.105:55439->52.94.220.13:443: read: connection reset by peer

          with aws_memorydb_cluster.test,
          on terraform_plugin_test.tf line 51, in resource "aws_memorydb_cluster" "test":
          51: resource "aws_memorydb_cluster" "test" {

    testing_new.go:84: Error running post-test destroy, there may be dangling resources: exit status 1

        Error: error deleting MemoryDB ACL (tf-test-6aighuv2): InvalidACLStateFault: ACL tf-test-6aighuv2 can't be deleted because it is still associated with some of the cluster(s).


        Error: error deleting MemoryDB Subnet Group (terraform-20221125121423748200000007): SubnetGroupInUseFault: Subnet group terraform-20221125121423748200000007 is currently in use by a cluster.

--- FAIL: TestAccMemoryDBCluster_Update_aclName (69.33s)
=== CONT  TestAccMemoryDBCluster_delete_withFinalSnapshot
--- PASS: TestAccMemoryDBCluster_Update_parameterGroup (914.72s)
=== CONT  TestAccMemoryDBCluster_create_fromSnapshot
--- PASS: TestAccMemoryDBCluster_basic (923.50s)
=== CONT  TestAccMemoryDBCluster_create_withPort
--- PASS: TestAccMemoryDBCluster_Update_numShards_scaleDown (1979.99s)
=== CONT  TestAccMemoryDBCluster_Update_nodeType
=== CONT  TestAccMemoryDBCluster_Update_numShards_scaleUp
--- PASS: TestAccMemoryDBCluster_Update_description (1229.16s)
--- PASS: TestAccMemoryDBCluster_create_withPort (1122.24s)
=== CONT  TestAccMemoryDBCluster_Update_maintenanceWindow
--- PASS: TestAccMemoryDBCluster_delete_withFinalSnapshot (2213.81s)
=== CONT  TestAccMemoryDBCluster_Update_numReplicasPerShard_scaleDown
--- PASS: TestAccMemoryDBCluster_Update_maintenanceWindow (1254.56s)
=== CONT  TestAccMemoryDBCluster_Update_tags
--- PASS: TestAccMemoryDBCluster_Update_nodeType (2098.77s)
=== CONT  TestAccMemoryDBCluster_namePrefix
--- PASS: TestAccMemoryDBCluster_create_fromSnapshot (3264.66s)
=== CONT  TestAccMemoryDBCluster_create_withDataTiering
--- PASS: TestAccMemoryDBCluster_Update_tags (1150.52s)
=== CONT  TestAccMemoryDBCluster_Update_snapshotWindow
--- PASS: TestAccMemoryDBCluster_Update_numReplicasPerShard_scaleDown (1626.62s)
=== CONT  TestAccMemoryDBCluster_Update_snsTopicARN
--- PASS: TestAccMemoryDBCluster_namePrefix (1107.78s)
=== CONT  TestAccMemoryDBCluster_Update_numReplicasPerShard_scaleUp
--- PASS: TestAccMemoryDBCluster_create_withDataTiering (1234.63s)
=== CONT  TestAccMemoryDBCluster_Update_snapshotRetentionLimit
--- PASS: TestAccMemoryDBCluster_Update_numShards_scaleUp (3371.01s)
=== CONT  TestAccMemoryDBCluster_Update_securityGroupIds
--- PASS: TestAccMemoryDBCluster_Update_snapshotWindow (1180.90s)
=== CONT  TestAccMemoryDBCluster_nameGenerated
--- PASS: TestAccMemoryDBCluster_Update_snsTopicARN (1130.76s)
=== CONT  TestAccMemoryDBCluster_defaults
--- PASS: TestAccMemoryDBCluster_Update_snapshotRetentionLimit (1214.42s)
=== CONT  TestAccMemoryDBCluster_create_noTLS
--- PASS: TestAccMemoryDBCluster_Update_securityGroupIds (1337.63s)
=== CONT  TestAccMemoryDBCluster_disappears
--- PASS: TestAccMemoryDBCluster_nameGenerated (1168.02s)
--- PASS: TestAccMemoryDBCluster_Update_numReplicasPerShard_scaleUp (1689.66s)
--- PASS: TestAccMemoryDBCluster_defaults (1290.65s)
--- PASS: TestAccMemoryDBCluster_create_noTLS (1110.28s)
--- PASS: TestAccMemoryDBCluster_disappears (1715.55s)
FAIL
FAIL    github.com/hashicorp/terraform-provider-aws/internal/service/memorydb   8470.517s
FAIL
make: *** [testacc] Error 1

$ make testacc TESTS=TestAccMemoryDBCluster_Update_aclName PKG=memorydb ACCTEST_TIMEOUT=600m ACCTEST_PARALLELISM=5
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/memorydb/... -v -count 1 -parallel 5 -run='TestAccMemoryDBCluster_Update_aclName'  -timeout 600m
=== RUN   TestAccMemoryDBCluster_Update_aclName
=== PAUSE TestAccMemoryDBCluster_Update_aclName
=== CONT  TestAccMemoryDBCluster_Update_aclName
--- PASS: TestAccMemoryDBCluster_Update_aclName (1232.52s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/memorydb   1234.412s

$ make testacc TESTS=TestAccMemoryDBClusterDataSource_ PKG=memorydb ACCTEST_TIMEOUT=600m ACCTEST_PARALLELISM=5
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/memorydb/... -v -count 1 -parallel 5 -run='TestAccMemoryDBClusterDataSource_'  -timeout 600m
=== RUN   TestAccMemoryDBClusterDataSource_basic
=== PAUSE TestAccMemoryDBClusterDataSource_basic
=== CONT  TestAccMemoryDBClusterDataSource_basic
--- PASS: TestAccMemoryDBClusterDataSource_basic (1639.73s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/memorydb   1641.575s

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. size/M Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. service/memorydb Issues and PRs that pertain to the memorydb service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Nov 25, 2022
@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@breathingdust breathingdust added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Nov 25, 2022
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 🚀.

% make testacc TESTARGS='-run=TestAccMemoryDBClusterDataSource_basic\|TestAccMemoryDBCluster_basic\|TestAccMemoryDBCluster_create_withDataTiering' PKG=memorydb ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/memorydb/... -v -count 1 -parallel 2  -run=TestAccMemoryDBClusterDataSource_basic\|TestAccMemoryDBCluster_basic\|TestAccMemoryDBCluster_create_withDataTiering -timeout 180m
=== RUN   TestAccMemoryDBClusterDataSource_basic
=== PAUSE TestAccMemoryDBClusterDataSource_basic
=== RUN   TestAccMemoryDBCluster_basic
=== PAUSE TestAccMemoryDBCluster_basic
=== RUN   TestAccMemoryDBCluster_create_withDataTiering
=== PAUSE TestAccMemoryDBCluster_create_withDataTiering
=== CONT  TestAccMemoryDBClusterDataSource_basic
=== CONT  TestAccMemoryDBCluster_create_withDataTiering
--- PASS: TestAccMemoryDBCluster_create_withDataTiering (1352.13s)
=== CONT  TestAccMemoryDBCluster_basic
--- PASS: TestAccMemoryDBClusterDataSource_basic (1647.41s)
--- PASS: TestAccMemoryDBCluster_basic (1749.59s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/memorydb	3106.344s

@ewbankkit
Copy link
Contributor

@roberth-k Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit 0fe96a1 into hashicorp:main Nov 28, 2022
@github-actions github-actions bot added this to the v4.42.0 milestone Nov 28, 2022
@github-actions
Copy link

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

@willforevercn
Copy link

thanks!

@github-actions
Copy link

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 Dec 31, 2022
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. enhancement Requests to existing resources that expand the functionality or scope. service/memorydb Issues and PRs that pertain to the memorydb service. size/M 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.

Restore memoryDB from multiple exported rdb files
4 participants