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

Add google_cloud_identity_group_lookup data source #1607

Conversation

modular-magician
Copy link
Collaborator

Closes hashicorp/terraform-provider-google#15812

This PR adds a data source that makes it easier to find the API-generated name for a Group when you only know the email for a given Group.

I've added:

  • Handwritten docs for the new data source
  • Acceptance test showing the data source can retrieve the name for a Group using its email
  • Acceptance test showing the data source can retrieve the name for a Group using an alias email - there isn't a way to create aliases through the Google provider but I'd added a test that uses a Group alias that's automatically created by the API.

Note: debug logs for the test updated in this PR currently 404, and I've made an issue for that here: hashicorp/terraform-provider-google#16124


Release Note Template for Downstream PRs (will be copied)

`google_cloud_identity_group_lookup`

Derived from GoogleCloudPlatform/magic-modules#9163

* Add initial version of `google_cloud_identity_group_lookup` data source and acceptance test

* Add `google_cloud_identity_group_lookup` to provider

* Add dependency

* Update `google_cloud_identity_group_lookup` test to check that the group name matches between resource and datasource

* Add documentation for `google_cloud_identity_group_lookup` data source

* Fix docs description, add link to EntityKey description

* Add second test case testing `google_cloud_identity_group_lookup` for lookup via alias

* Format imports

* Fix mixture of tabs/spaces in config strings for cloud identity group tests

* Remove unneeded data source from acc test step

* Remove inter-datasource comparison check
[upstream:91231a153e48efbc72d28a58447cafc0ba56042d]

Signed-off-by: Modular Magician <[email protected]>
@modular-magician modular-magician requested a review from a team as a code owner October 18, 2023 15:29
@modular-magician modular-magician requested review from ScottSuarez and removed request for a team October 18, 2023 15:29
@modular-magician modular-magician merged commit 024805f into GoogleCloudPlatform:main Oct 18, 2023
2 checks passed
@modular-magician modular-magician deleted the downstream-pr-91231a153e48efbc72d28a58447cafc0ba56042d branch November 18, 2024 06:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow Cloud Identity group membership lookup by alias or email
1 participant