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 #9163

Merged
merged 11 commits into from
Oct 18, 2023

Conversation

SarahFrench
Copy link
Collaborator

@SarahFrench SarahFrench commented Oct 4, 2023

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`

@modular-magician

This comment was marked as outdated.

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

Terraform GA: Diff ( 4 files changed, 150 insertions(+))
Terraform Beta: Diff ( 4 files changed, 150 insertions(+))

@SarahFrench SarahFrench changed the title Add google_cloud_identity_group_lookup data souce Add google_cloud_identity_group_lookup data source Oct 4, 2023
@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3117
Passed tests 2798
Skipped tests: 315
Affected tests: 4

Action taken

Found 4 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccCloudIdentityGroup|TestAccContainerCluster_withAddons|TestAccContainerNodePool_withUpgradeSettings|TestAccContainerNodePool_withKubeletConfig

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccCloudIdentityGroup[Error message] [Debug log]
TestAccContainerCluster_withAddons[Error message] [Debug log]
TestAccContainerNodePool_withUpgradeSettings[Error message] [Debug log]
TestAccContainerNodePool_withKubeletConfig[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$
View the build log or the debug log for each test

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

Terraform GA: Diff ( 4 files changed, 153 insertions(+))
Terraform Beta: Diff ( 4 files changed, 153 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3117
Passed tests 2798
Skipped tests: 315
Affected tests: 4

Action taken

Found 4 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccCloudIdentityGroup|TestAccContainerNodePool_withUpgradeSettings|TestAccContainerNodePool_withKubeletConfig|TestAccContainerCluster_withAddons

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccCloudIdentityGroup[Debug log]

Rerun these tests in REPLAYING mode to catch issues

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccContainerNodePool_withUpgradeSettings[Error message] [Debug log]
TestAccContainerNodePool_withKubeletConfig[Error message] [Debug log]
TestAccContainerCluster_withAddons[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$
View the build log or the debug log for each test

@modular-magician

This comment was marked as outdated.

@SarahFrench SarahFrench marked this pull request as ready for review October 5, 2023 11:52
@SarahFrench SarahFrench marked this pull request as draft October 5, 2023 11:53
@modular-magician

This comment was marked as outdated.

@modular-magician

This comment was marked as outdated.

@SarahFrench SarahFrench marked this pull request as ready for review October 5, 2023 13:28
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

Terraform GA: Diff ( 6 files changed, 268 insertions(+), 1 deletion(-))
Terraform Beta: Diff ( 6 files changed, 268 insertions(+), 1 deletion(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3119
Passed tests 2800
Skipped tests: 318
Affected tests: 1

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccCloudIdentityGroup

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccCloudIdentityGroup[Debug log]

Rerun these tests in REPLAYING mode to catch issues

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{green}{\textsf{All tests passed!}}$
View the build log or the debug log for each test

@SarahFrench
Copy link
Collaborator Author

👋 Hi @shuyama1 - could you take a look at this PR please?

@shuyama1
Copy link
Member

@SarahFrench Sorry this fell off my radar. Taking a look now

@shuyama1
Copy link
Member

Trigger a rerun while I'm reviewing the PR. since the last tests run weeks ago
/gcbrun

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

Terraform GA: Diff ( 6 files changed, 268 insertions(+), 1 deletion(-))
Terraform Beta: Diff ( 6 files changed, 268 insertions(+), 1 deletion(-))

Copy link
Member

@shuyama1 shuyama1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall looks good! only some nitpicks + question

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3148
Passed tests 2830
Skipped tests: 317
Affected tests: 1

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccBigtableAppProfile_bigtableAppProfileMulticlusterExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccBigtableAppProfile_bigtableAppProfileMulticlusterExample[Debug log]

Rerun these tests in REPLAYING mode to catch issues

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{green}{\textsf{All tests passed!}}$
View the build log or the debug log for each test

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

Terraform GA: Diff ( 7 files changed, 266 insertions(+), 5 deletions(-))
Terraform Beta: Diff ( 7 files changed, 269 insertions(+), 8 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3153
Passed tests 2834
Skipped tests: 318
Affected tests: 1

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccCloudIdentityGroup

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccCloudIdentityGroup[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$
View the build log or the debug log for each test

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

Terraform GA: Diff ( 7 files changed, 264 insertions(+), 5 deletions(-))
Terraform Beta: Diff ( 7 files changed, 267 insertions(+), 8 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3153
Passed tests 2834
Skipped tests: 318
Affected tests: 1

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccDataprocClusterIamPolicy

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccDataprocClusterIamPolicy[Debug log]

Rerun these tests in REPLAYING mode to catch issues

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{green}{\textsf{All tests passed!}}$
View the build log or the debug log for each test

@SarahFrench
Copy link
Collaborator Author

Thanks @shuyama1!

@SarahFrench SarahFrench merged commit 91231a1 into main Oct 18, 2023
12 checks passed
zli82016 pushed a commit that referenced this pull request Oct 20, 2023
* 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
@SarahFrench SarahFrench deleted the add-group-lookup-datasource branch February 6, 2024 11:01
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
3 participants