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

memorydb: Migrate to AWS SDK v2 #38576

Merged
merged 10 commits into from
Aug 7, 2024

Conversation

mattburgess
Copy link
Collaborator

@mattburgess mattburgess commented Jul 28, 2024

Description

Relations

Closes #36187
Relates #32976

References

Output from Acceptance Testing

% make testacc TESTS=TestAccXXX PKG=ec2

...

@mattburgess mattburgess requested a review from a team as a code owner July 28, 2024 21:40
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.

@terraform-aws-provider terraform-aws-provider bot added tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. sweeper Pertains to changes to or issues with the sweeper. tags Pertains to resource tagging. service/memorydb Issues and PRs that pertain to the memorydb service. client-connections Pertains to the AWS Client and service connections. generators Relates to code generators. size/XL Managed by automation to categorize the size of a PR. labels Jul 28, 2024
@justinretzolk justinretzolk added the external-maintainer Contribution from a trusted external contributor. label Jul 29, 2024
@jar-b jar-b self-assigned this Aug 7, 2024
@github-actions github-actions bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Aug 7, 2024
Copy link
Member

@jar-b jar-b 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 PKG=memorydb
make: Verifying source code with gofmt...                                                                                                                                                                       ==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.5 test ./internal/service/memorydb/... -v -count 1 -parallel 20   -timeout 360m

--- PASS: TestAccMemoryDBUser_disappears (50.30s)                                                                                                                                                               === CONT  TestAccMemoryDBCluster_Update_nodeType
--- PASS: TestAccMemoryDBSubnetGroup_namePrefix (53.24s)
=== CONT  TestAccMemoryDBCluster_Update_maintenanceWindow
--- PASS: TestAccMemoryDBSubnetGroup_nameGenerated (56.11s)
=== CONT  TestAccMemoryDBCluster_Update_engineVersion
--- PASS: TestAccMemoryDBSubnetGroup_disappears (59.21s)
=== CONT  TestAccMemoryDBCluster_Update_description
--- PASS: TestAccMemoryDBSubnetGroup_basic (65.27s)
=== CONT  TestAccMemoryDBACL_update_userNames
--- PASS: TestAccMemoryDBUser_tags (87.28s)
=== CONT  TestAccMemoryDBCluster_Update_aclName
--- PASS: TestAccMemoryDBUser_authenticationModeIAM (87.61s)
=== CONT  TestAccMemoryDBACL_update_tags
--- PASS: TestAccMemoryDBUser_basic (90.21s)
=== CONT  TestAccMemoryDBCluster_delete_withFinalSnapshot
--- PASS: TestAccMemoryDBSubnetGroup_update_description (92.33s)
=== CONT  TestAccMemoryDBACL_namePrefix
--- PASS: TestAccMemoryDBUserDataSource_basic (93.57s)
=== CONT  TestAccMemoryDBCluster_create_fromSnapshot
--- PASS: TestAccMemoryDBUserDataSource_authenticationModeIAM (96.00s)                                                                                                                                          === CONT  TestAccMemoryDBACL_nameGenerated
--- PASS: TestAccMemoryDBSubnetGroup_update_subnetIds (112.33s)
=== CONT  TestAccMemoryDBCluster_create_withPort
--- PASS: TestAccMemoryDBSubnetGroup_update_tags (123.03s)
=== CONT  TestAccMemoryDBCluster_namePrefix
--- PASS: TestAccMemoryDBUser_update_accessString (149.91s)
=== CONT  TestAccMemoryDBACL_disappears
--- PASS: TestAccMemoryDBACL_namePrefix (58.69s)
=== CONT  TestAccMemoryDBCluster_create_withKMS
--- PASS: TestAccMemoryDBACL_update_tags (66.40s)
=== CONT  TestAccMemoryDBCluster_nameGenerated
--- PASS: TestAccMemoryDBACL_nameGenerated (58.57s)
=== CONT  TestAccMemoryDBACL_basic
--- PASS: TestAccMemoryDBACLDataSource_basic (157.56s)
=== CONT  TestAccMemoryDBCluster_create_withDataTiering
--- PASS: TestAccMemoryDBUser_update_passwords (208.36s)
=== CONT  TestAccMemoryDBCluster_disappears
--- PASS: TestAccMemoryDBACL_disappears (72.79s)
=== CONT  TestAccMemoryDBCluster_defaults
=== CONT  TestAccMemoryDBCluster_basic
--- PASS: TestAccMemoryDBACL_basic (178.43s)
--- PASS: TestAccMemoryDBACL_update_userNames (629.81s)
=== CONT  TestAccMemoryDBParameterGroup_update_parameters                                                                                                                                      12:56:18 [49/309]
--- PASS: TestAccMemoryDBParameterGroup_update_parameters (83.25s)
=== CONT  TestAccMemoryDBCluster_Update_snapshotWindow
--- PASS: TestAccMemoryDBCluster_create_noTLS (1548.29s)
=== CONT  TestAccMemoryDBSnapshot_disappears
--- PASS: TestAccMemoryDBCluster_Update_description (1665.25s)
=== CONT  TestAccMemoryDBSnapshot_nameGenerated
--- PASS: TestAccMemoryDBClusterDataSource_basic (1791.25s)
=== CONT  TestAccMemoryDBParameterGroup_disappears
--- PASS: TestAccMemoryDBParameterGroup_disappears (12.82s)                                                                                                                                                     === CONT  TestAccMemoryDBSnapshot_basic
--- PASS: TestAccMemoryDBCluster_Update_snapshotWindow (1832.27s)
=== CONT  TestAccMemoryDBSubnetGroupDataSource_basic
--- PASS: TestAccMemoryDBSubnetGroupDataSource_basic (20.37s)
=== CONT  TestAccMemoryDBParameterGroup_basic
--- PASS: TestAccMemoryDBParameterGroup_basic (16.12s)
=== CONT  TestAccMemoryDBSnapshotDataSource_basic
--- PASS: TestAccMemoryDBCluster_create_withPort (2650.73s)
=== CONT  TestAccMemoryDBSnapshot_update_tags
--- PASS: TestAccMemoryDBCluster_Update_aclName (2787.52s)
=== CONT  TestAccMemoryDBParameterGroupDataSource_basic
--- PASS: TestAccMemoryDBParameterGroupDataSource_basic (14.26s)
=== CONT  TestParameterChanges
--- PASS: TestParameterChanges (0.00s)
=== CONT  TestAccMemoryDBCluster_Update_tags
--- PASS: TestAccMemoryDBCluster_defaults (2679.43s)
=== CONT  TestAccMemoryDBSnapshot_create_withKMS
--- PASS: TestAccMemoryDBCluster_Update_numShards_scaleUp (3379.10s)
=== CONT  TestAccMemoryDBParameterGroup_update_tags
--- PASS: TestAccMemoryDBParameterGroup_update_tags (56.68s)                                                                                                                                                    === CONT  TestAccMemoryDBCluster_Update_snsTopicARN
--- PASS: TestAccMemoryDBCluster_Update_maintenanceWindow (3615.50s)
=== CONT  TestAccMemoryDBSnapshot_namePrefix
--- PASS: TestAccMemoryDBCluster_Update_engineVersion (3775.65s)
=== CONT  TestAccMemoryDBCluster_Update_parameterGroup
--- PASS: TestAccMemoryDBCluster_Update_nodeType (3952.30s)
=== CONT  TestAccMemoryDBCluster_Update_numReplicasPerShard_scaleDown
--- PASS: TestAccMemoryDBCluster_create_withDataTiering (3970.76s)
=== CONT  TestAccMemoryDBCluster_Update_snapshotRetentionLimit
--- PASS: TestAccMemoryDBCluster_Update_numShards_scaleDown (4685.33s)
=== CONT  TestAccMemoryDBCluster_Update_securityGroupIds
--- PASS: TestAccMemoryDBCluster_namePrefix (4757.44s)
=== CONT  TestAccMemoryDBCluster_Update_numReplicasPerShard_scaleUp
--- PASS: TestAccMemoryDBSnapshot_disappears (3710.32s)
--- PASS: TestAccMemoryDBCluster_Update_snsTopicARN (1840.21s)
--- PASS: TestAccMemoryDBCluster_basic (5020.53s)
--- PASS: TestAccMemoryDBSnapshot_nameGenerated (4194.78s)
--- PASS: TestAccMemoryDBCluster_disappears (5930.06s)
--- PASS: TestAccMemoryDBCluster_Update_snapshotRetentionLimit (2147.73s)
--- PASS: TestAccMemoryDBCluster_delete_withFinalSnapshot (6285.26s)
--- PASS: TestAccMemoryDBCluster_delete_withFinalSnapshot (6285.26s)
=== NAME  TestAccMemoryDBCluster_nameGenerated
    cluster_test.go:162: Step 1/1 error: Error running apply: exit status 1

        Error: waiting for MemoryDB Cluster (terraform-20240807145621695100000015) to be created: timeout while waiting for state to become 'available' (last state: 'creating', timeout: 2h0m0s)

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

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

        Error: deleting MemoryDB Subnet Group (terraform-20240807145620429500000014): operation error MemoryDB: DeleteSubnetGroup, https response error StatusCode: 400, RequestID: 07f1da62-0ea1-4004-b412-1f5bd605ba81, SubnetGroupInUseFault: Subnet group terraform-20240807145620429500000014 is currently in use by a cluster.

--- FAIL: TestAccMemoryDBCluster_nameGenerated (7212.08s)
--- PASS: TestAccMemoryDBSnapshotDataSource_basic (4842.88s)
--- PASS: TestAccMemoryDBCluster_create_fromSnapshot (7397.13s)
--- PASS: TestAccMemoryDBCluster_create_withKMS (7341.99s)
--- PASS: TestAccMemoryDBCluster_Update_parameterGroup (3663.41s)
--- PASS: TestAccMemoryDBSnapshot_basic (5693.85s)
--- PASS: TestAccMemoryDBSnapshot_update_tags (4735.21s)
=== NAME  TestAccMemoryDBCluster_Update_securityGroupIds
    cluster_test.go:795: Step 6/7 error: Error running pre-apply plan: exit status 1

        Error: Invalid provider configuration

        Provider "registry.terraform.io/hashicorp/aws" requires explicit
        configuration. Add a provider block to the root module and configure the
        provider's required arguments as described in the provider documentation.


        Error: Retrieving AWS account details: validating provider credentials: retrieving caller identity from STS: operation error STS: GetCallerIdentity, https response error StatusCode: 403, RequestID: ab16ee6e-ffaf-4945-b3a6-b50c00a90328, api error SignatureDoesNotMatch: Signature expired: 20240807T173156Z is now earlier than 20240807T173205Z (20240807T174705Z - 15 min.)

          with provider["registry.terraform.io/hashicorp/aws"],
          on <empty> line 0:
          (source code not available)

--- PASS: TestAccMemoryDBCluster_Update_numReplicasPerShard_scaleUp (2703.83s)
--- PASS: TestAccMemoryDBCluster_Update_numReplicasPerShard_scaleDown (3583.56s)
--- FAIL: TestAccMemoryDBCluster_Update_securityGroupIds (2969.77s)
--- PASS: TestAccMemoryDBSnapshot_namePrefix (3986.93s)
--- PASS: TestAccMemoryDBSnapshot_create_withKMS (4894.66s)
--- PASS: TestAccMemoryDBCluster_Update_tags (5321.77s)
FAIL
FAIL    github.com/hashicorp/terraform-provider-aws/internal/service/memorydb   8219.500s

The test failures on the first pass are transient and occasionally observed in our own CI. Re-running produces passing tests.

% make testacc PKG=memorydb TESTS="TestAccMemoryDBCluster_nameGenerated|TestAccMemoryDBCluster_Update_securityGroupIds"
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.5 test ./internal/service/memorydb/... -v -count 1 -parallel 20 -run='TestAccMemoryDBCluster_nameGenerated|TestAccMemoryDBCluster_Update_securityGroupIds'  -timeout 360m

--- PASS: TestAccMemoryDBCluster_Update_securityGroupIds (1378.07s)
--- PASS: TestAccMemoryDBCluster_nameGenerated (1378.12s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/memorydb   1384.077s

@jar-b
Copy link
Member

jar-b commented Aug 7, 2024

Thanks for your contribution, @mattburgess! 👍

@jar-b jar-b merged commit 9500f75 into hashicorp:main Aug 7, 2024
110 checks passed
@github-actions github-actions bot added this to the v5.62.0 milestone Aug 7, 2024
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Aug 9, 2024
Copy link

github-actions bot commented Aug 9, 2024

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

github-actions bot commented Sep 9, 2024

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 Sep 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
client-connections Pertains to the AWS Client and service connections. external-maintainer Contribution from a trusted external contributor. generators Relates to code generators. service/memorydb Issues and PRs that pertain to the memorydb service. size/XL Managed by automation to categorize the size of a PR. sweeper Pertains to changes to or issues with the sweeper. tags Pertains to resource tagging. 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 SDK for Go Migration] MemoryDB for Redis Service
3 participants