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

d/aws_identitystore_user: expose all user attributes #27053

Merged

Conversation

roberth-k
Copy link
Contributor

Description

Relations

Relates #26598

  • Refactor data source using the aws_identitystore_user resource.
  • Refactor resource using the GetUserId and DescribeUser API-s instead of ListUsers.
  • Expose all attributes of the User data type.
  • Deprecates the filter attribute in favour of the alternate_identifier configuration block in line with GetUserId.

References

Output from Acceptance Testing

$ make testacc TESTS=TestAccIdentityStoreUserDataSource_ PKG=identitystore
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/identitystore/... -v -count 1 -parallel 20 -run='TestAccIdentityStoreUserDataSource_' -timeout 180m
=== RUN TestAccIdentityStoreUserDataSource_basic
=== PAUSE TestAccIdentityStoreUserDataSource_basic
=== RUN TestAccIdentityStoreUserDataSource_filterUserName
=== PAUSE TestAccIdentityStoreUserDataSource_filterUserName
=== RUN TestAccIdentityStoreUserDataSource_uniqueAttributeUserName
=== PAUSE TestAccIdentityStoreUserDataSource_uniqueAttributeUserName
=== RUN TestAccIdentityStoreUserDataSource_email
=== PAUSE TestAccIdentityStoreUserDataSource_email
=== RUN TestAccIdentityStoreUserDataSource_userID
=== PAUSE TestAccIdentityStoreUserDataSource_userID
=== RUN TestAccIdentityStoreUserDataSource_nonExistent
=== PAUSE TestAccIdentityStoreUserDataSource_nonExistent
=== RUN TestAccIdentityStoreUserDataSource_userIdFilterMismatch
=== PAUSE TestAccIdentityStoreUserDataSource_userIdFilterMismatch
=== RUN TestAccIdentityStoreUserDataSource_externalIdConflictsWithUniqueAttribute
=== PAUSE TestAccIdentityStoreUserDataSource_externalIdConflictsWithUniqueAttribute
=== RUN TestAccIdentityStoreUserDataSource_filterConflictsWithExternalId
=== PAUSE TestAccIdentityStoreUserDataSource_filterConflictsWithExternalId
=== RUN TestAccIdentityStoreUserDataSource_userIdConflictsWithExternalId
=== PAUSE TestAccIdentityStoreUserDataSource_userIdConflictsWithExternalId
=== CONT TestAccIdentityStoreUserDataSource_basic
=== CONT TestAccIdentityStoreUserDataSource_nonExistent
=== CONT TestAccIdentityStoreUserDataSource_filterConflictsWithExternalId
=== CONT TestAccIdentityStoreUserDataSource_userIdConflictsWithExternalId
=== CONT TestAccIdentityStoreUserDataSource_externalIdConflictsWithUniqueAttribute
=== CONT TestAccIdentityStoreUserDataSource_userID
=== CONT TestAccIdentityStoreUserDataSource_uniqueAttributeUserName
=== CONT TestAccIdentityStoreUserDataSource_filterUserName
=== CONT TestAccIdentityStoreUserDataSource_userIdFilterMismatch
=== CONT TestAccIdentityStoreUserDataSource_email
--- PASS: TestAccIdentityStoreUserDataSource_externalIdConflictsWithUniqueAttribute (4.41s)
--- PASS: TestAccIdentityStoreUserDataSource_nonExistent (8.04s)
--- PASS: TestAccIdentityStoreUserDataSource_filterConflictsWithExternalId (16.63s)
--- PASS: TestAccIdentityStoreUserDataSource_userIdConflictsWithExternalId (17.13s)
--- PASS: TestAccIdentityStoreUserDataSource_userIdFilterMismatch (17.36s)
--- PASS: TestAccIdentityStoreUserDataSource_uniqueAttributeUserName (27.36s)
--- PASS: TestAccIdentityStoreUserDataSource_basic (27.62s)
--- PASS: TestAccIdentityStoreUserDataSource_filterUserName (27.63s)
--- PASS: TestAccIdentityStoreUserDataSource_userID (28.47s)
--- PASS: TestAccIdentityStoreUserDataSource_email (28.85s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/identitystore 30.627s

@github-actions
Copy link

github-actions bot commented Oct 1, 2022

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.

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. documentation Introduces or discusses updates to documentation. service/identitystore Issues and PRs that pertain to the identitystore service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. size/XL Managed by automation to categorize the size of a PR. labels Oct 1, 2022
@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Oct 3, 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=TestAccIdentityStoreUserDataSource_' PKG=identitystore ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/identitystore/... -v -count 1 -parallel 3  -run=TestAccIdentityStoreUserDataSource_ -timeout 180m
=== RUN   TestAccIdentityStoreUserDataSource_basic
=== PAUSE TestAccIdentityStoreUserDataSource_basic
=== RUN   TestAccIdentityStoreUserDataSource_filterUserName
=== PAUSE TestAccIdentityStoreUserDataSource_filterUserName
=== RUN   TestAccIdentityStoreUserDataSource_uniqueAttributeUserName
=== PAUSE TestAccIdentityStoreUserDataSource_uniqueAttributeUserName
=== RUN   TestAccIdentityStoreUserDataSource_email
=== PAUSE TestAccIdentityStoreUserDataSource_email
=== RUN   TestAccIdentityStoreUserDataSource_userID
=== PAUSE TestAccIdentityStoreUserDataSource_userID
=== RUN   TestAccIdentityStoreUserDataSource_nonExistent
=== PAUSE TestAccIdentityStoreUserDataSource_nonExistent
=== RUN   TestAccIdentityStoreUserDataSource_userIdFilterMismatch
=== PAUSE TestAccIdentityStoreUserDataSource_userIdFilterMismatch
=== RUN   TestAccIdentityStoreUserDataSource_externalIdConflictsWithUniqueAttribute
=== PAUSE TestAccIdentityStoreUserDataSource_externalIdConflictsWithUniqueAttribute
=== RUN   TestAccIdentityStoreUserDataSource_filterConflictsWithExternalId
=== PAUSE TestAccIdentityStoreUserDataSource_filterConflictsWithExternalId
=== RUN   TestAccIdentityStoreUserDataSource_userIdConflictsWithExternalId
=== PAUSE TestAccIdentityStoreUserDataSource_userIdConflictsWithExternalId
=== CONT  TestAccIdentityStoreUserDataSource_basic
=== CONT  TestAccIdentityStoreUserDataSource_email
=== CONT  TestAccIdentityStoreUserDataSource_userIdFilterMismatch
--- PASS: TestAccIdentityStoreUserDataSource_userIdFilterMismatch (13.08s)
=== CONT  TestAccIdentityStoreUserDataSource_uniqueAttributeUserName
--- PASS: TestAccIdentityStoreUserDataSource_basic (20.69s)
=== CONT  TestAccIdentityStoreUserDataSource_filterConflictsWithExternalId
--- PASS: TestAccIdentityStoreUserDataSource_email (21.47s)
=== CONT  TestAccIdentityStoreUserDataSource_userIdConflictsWithExternalId
--- PASS: TestAccIdentityStoreUserDataSource_filterConflictsWithExternalId (9.47s)
=== CONT  TestAccIdentityStoreUserDataSource_filterUserName
--- PASS: TestAccIdentityStoreUserDataSource_userIdConflictsWithExternalId (9.70s)
=== CONT  TestAccIdentityStoreUserDataSource_nonExistent
--- PASS: TestAccIdentityStoreUserDataSource_uniqueAttributeUserName (18.49s)
=== CONT  TestAccIdentityStoreUserDataSource_externalIdConflictsWithUniqueAttribute
--- PASS: TestAccIdentityStoreUserDataSource_externalIdConflictsWithUniqueAttribute (2.16s)
=== CONT  TestAccIdentityStoreUserDataSource_userID
--- PASS: TestAccIdentityStoreUserDataSource_nonExistent (4.32s)
--- PASS: TestAccIdentityStoreUserDataSource_filterUserName (19.82s)
--- PASS: TestAccIdentityStoreUserDataSource_userID (19.04s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/identitystore	57.838s

@ewbankkit
Copy link
Contributor

@roberth-k Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit c9da374 into hashicorp:main Oct 3, 2022
@github-actions github-actions bot added this to the v4.34.0 milestone Oct 3, 2022
@github-actions
Copy link

github-actions bot commented Oct 6, 2022

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

@github-actions
Copy link

github-actions bot commented Nov 7, 2022

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 Nov 7, 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. service/identitystore Issues and PRs that pertain to the identitystore service. size/XL 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.

None yet

2 participants