Skip to content

adding data source for identity pool#4134

Merged
slevenick merged 3 commits intoGoogleCloudPlatform:masterfrom
wvanderdeijl:identity-fed-pool-data-source
Oct 30, 2020
Merged

adding data source for identity pool#4134
slevenick merged 3 commits intoGoogleCloudPlatform:masterfrom
wvanderdeijl:identity-fed-pool-data-source

Conversation

@wvanderdeijl
Copy link
Copy Markdown
Contributor

@wvanderdeijl wvanderdeijl commented Oct 21, 2020

follow up to PR #4071 and part of bigger issue hashicorp/terraform-provider-google#7455

If this PR is for Terraform, I acknowledge that I have:

  • Searched through the issue tracker for an open issue that this either resolves or contributes to, commented on it to claim it, and written "fixes {url}" or "part of {url}" in this PR description. If there were no relevant open issues, I opened one and commented that I would like to work on it (not necessary for very small changes).
  • Generated Terraform, and ran make test and make lint to ensure it passes unit and linter tests.
  • Ensured that all new fields I added that can be set by a user appear in at least one example (for generated resources) or third_party test (for handwritten resources or update tests).
  • Ran relevant acceptance tests (If the acceptance tests do not yet pass or you are unable to run them, please let your reviewer know).
  • Read the Release Notes Guide before writing my release note below.

Release Note Template for Downstream PRs (will be copied)

`google_iam_workload_identity_pool`

@google-cla google-cla bot added the cla: yes label Oct 21, 2020
@modular-magician
Copy link
Copy Markdown
Collaborator

Hello! I am a robot who works on Magic Modules PRs.

I have detected that you are a community contributor, so your PR will be assigned to someone with a commit-bit on this repo for initial review.

Thanks for your contribution! A human will be with you soon.

@danawillow, please review this PR or find an appropriate assignee.

@wvanderdeijl
Copy link
Copy Markdown
Contributor Author

Unfortunately when I run the test it fails:

2020/10/21 15:01:21 [DEBUG] Retry Transport: Returning after 1 attempts
    TestAccDataSourceIAMBetaWorkloadIdentityPool_basic: testing_new_config.go:88: no "id" found in attributes
    TestAccDataSourceIAMBetaWorkloadIdentityPool_basic: testing_new.go:57: no "id" found in attributes
--- FAIL: TestAccDataSourceIAMBetaWorkloadIdentityPool_basic (18.68s)
FAIL
FAIL	github.com/hashicorp/terraform-provider-google-beta/google-beta	19.425s
FAIL
make: *** [testacc] Error 1

when enabling TF logging it seems like the datasource is trying to do a GET before the resource is created. I guess the workload_identity_pool_id attribute from the resource is already know before creating the actual resource, so the datasource thinks it has enough information to do the GET.
Does anybody know how to fix this?

@wvanderdeijl wvanderdeijl marked this pull request as ready for review October 21, 2020 13:09
@modular-magician
Copy link
Copy Markdown
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 4 files changed, 47 insertions(+))
Terraform Beta: Diff ( 5 files changed, 113 insertions(+))

@modular-magician
Copy link
Copy Markdown
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 4 files changed, 47 insertions(+))
Terraform Beta: Diff ( 5 files changed, 121 insertions(+))

@danawillow
Copy link
Copy Markdown
Contributor

/gcbrun

@modular-magician
Copy link
Copy Markdown
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=153647"

@modular-magician
Copy link
Copy Markdown
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 4 files changed, 47 insertions(+))
Terraform Beta: Diff ( 5 files changed, 121 insertions(+))

@modular-magician
Copy link
Copy Markdown
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccDataSourceIAMBetaWorkloadIdentityPool_basic|TestAccDataSourceSpannerInstance_basic You can view the result here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=153652"

@wvanderdeijl
Copy link
Copy Markdown
Contributor Author

@danawillow do you want me to make more changes to this PR, or is this good to go?
I still don't understand why the datasource tests fail at my end, but we can ignore that if the tests succeed at your end.
Also, if you want me to change the workload_identity_pool_id behaviour I would need some guidance on how to do that as I feel I have followed the example given to met in #4071

@danawillow danawillow requested a review from slevenick October 28, 2020 16:58
@danawillow
Copy link
Copy Markdown
Contributor

@slevenick can you take this over from me?

@slevenick
Copy link
Copy Markdown
Contributor

/gcbrun

@modular-magician
Copy link
Copy Markdown
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=154827"

@modular-magician
Copy link
Copy Markdown
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 4 files changed, 47 insertions(+))
Terraform Beta: Diff ( 5 files changed, 121 insertions(+))

@modular-magician
Copy link
Copy Markdown
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=155055"

@modular-magician
Copy link
Copy Markdown
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccDataSourceSpannerInstance_basic|TestAccBigqueryDataTransferConfig|TestAccMonitoringSlo_monitoringSloRequestBasedExample You can view the result here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=155141"

Copy link
Copy Markdown
Contributor

@slevenick slevenick left a comment

Choose a reason for hiding this comment

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

Tests pass, seems fine to me. Just request the beta-only note in the docs

# google\_iam\_workload_\identity\_pool

Get a IAM workload identity pool from Google Cloud by its id.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We probably want a note that this resource is in beta only here:

~> **Warning:** This resource is in beta, and should be used with the terraform-provider-google-beta provider.
See [Provider Versions](https://terraform.io/docs/providers/google/guides/provider_versions.html) for more details on beta resources.

is the one that we generally use

Similar to: https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_managed_ssl_certificate

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

@modular-magician
Copy link
Copy Markdown
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 4 files changed, 50 insertions(+))
Terraform Beta: Diff ( 5 files changed, 124 insertions(+))

@slevenick slevenick requested review from danawillow and slevenick and removed request for danawillow October 30, 2020 17:19
Copy link
Copy Markdown
Contributor

@slevenick slevenick left a comment

Choose a reason for hiding this comment

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

Thanks!

@slevenick slevenick removed the request for review from danawillow October 30, 2020 17:21
@slevenick
Copy link
Copy Markdown
Contributor

Huh, I can't merge as Dana's review requested changes. @danawillow can you remove yourself from this PR, I can't seem to do it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants