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

resourcemanager: adding "google_folders" data source #10261

Merged
merged 4 commits into from
Nov 30, 2021
Merged

resourcemanager: adding "google_folders" data source #10261

merged 4 commits into from
Nov 30, 2021

Conversation

mikelaramie
Copy link
Contributor

The goal of this PR is to add a new data source to the provider, google_folders, to allow terraform code to enumerate a list of folders within a parent object (org or folder).

The code was modified from the existing google_projects data source to fit the needs of querying folders from the resourcemanager api v3.

@megan07 megan07 requested a review from slevenick October 6, 2021 20:29
@mikelaramie
Copy link
Contributor Author

Hi @slevenick - is there anything else we need to validate/update here? Thank you!

@mikelaramie
Copy link
Contributor Author

Hi @megan07 @slevenick is there anything else we need to do here to get this data source added in? Thanks!

Copy link
Collaborator

@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.

Looks like the test fails with:

provider_test.go:278: Step 1/1 error: Check failed: Check 1/8 error: Not found: data.google_folders.my-folder in [root]

Are you able to run this test locally?

@mikelaramie
Copy link
Contributor Author

It should pass now; I was running the wrong test locally, and got the failure you saw when I ran the right test. Sorry about that!

❯ make testacc TEST=./google TESTARGS='-run=TestAccDataSourceGoogleFolders_basic'
==> Checking source code against gofmt...
==> Checking that code complies with gofmt requirements...
go generate  ./...
TF_ACC=1 TF_SCHEMA_PANIC_ON_ERROR=1 go test ./google -v -run=TestAccDataSourceGoogleFolders_basic -timeout 240m -ldflags="-X=github.com/hashicorp/terraform-provider-google/version.ProviderVersion=acc"
=== RUN   TestAccDataSourceGoogleFolders_basic
=== PAUSE TestAccDataSourceGoogleFolders_basic
=== CONT  TestAccDataSourceGoogleFolders_basic
--- PASS: TestAccDataSourceGoogleFolders_basic (17.50s)
PASS
ok  	github.com/hashicorp/terraform-provider-google/google	18.199s

@mikelaramie
Copy link
Contributor Author

I also signed the CLA, so hopefully that check will pass now in MM

Copy link
Collaborator

@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.

Looks good, thanks!

@slevenick slevenick merged commit 91b3588 into hashicorp:master Nov 30, 2021
@mikelaramie mikelaramie deleted the feat-google-folders branch December 1, 2021 16:50
@github-actions
Copy link

github-actions bot commented Jan 1, 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 Jan 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants