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

google_folders datasource #6051

Closed
sleterrier opened this issue Apr 6, 2020 · 4 comments
Closed

google_folders datasource #6051

sleterrier opened this issue Apr 6, 2020 · 4 comments

Comments

@sleterrier
Copy link

sleterrier commented Apr 6, 2020

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment. If the issue is assigned to the "modular-magician" user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If the issue is assigned to a user, that user is claiming responsibility for the issue. If the issue is assigned to "hashibot", a community member has claimed the issue already.

Description

Dynamic lookup of a folder is currently only possible via:

  • d/google_folder, which requires the name of the folder in the form {folder_id} or folders/{folder_id}.
  • or d/google_active_folder , which requires the display_name and the parent (Organization or Folder)

It would be very handy to be able to get a list of folder(s) matching a string filter under a given Organization or Folder as well, in the same manner as d/google_projects.

New or Affected Resource(s)

  • data source google_folders

Potential Terraform Configuration

data "google_folders" "my-org-folders" {
  filter = "parent.id:012345678910 lifecycleState:ACTIVE"
}

data "google_folders" "my-subfolders" {
  filter = "parent.id:folders/0123456789 lifecycleState:ACTIVE"
}

Attributes Reference
The following attributes are exported:

  • folders - A list of folders matching the provided filter. Structure is defined below.

The folders block supports:

  • folder_id - The folder id of the folder.
  • folder_name - The folder name of the folder.
@ghost ghost added the enhancement label Apr 6, 2020
@danawillow danawillow added this to the Goals milestone Apr 6, 2020
@ngodec
Copy link

ngodec commented Oct 13, 2020

This PR might make it easier to look up folders: #7509

@imrannayer
Copy link

Is there any update on this?

modular-magician added a commit to modular-magician/terraform-provider-google that referenced this issue Jun 2, 2022
modular-magician added a commit that referenced this issue Jun 2, 2022
@github-actions github-actions bot added forward/review In review; remove label to forward service/cloudresourcemanager-crm labels Sep 27, 2023
@roaks3
Copy link
Collaborator

roaks3 commented Jul 31, 2024

Appears resolved by GoogleCloudPlatform/magic-modules#5437

@roaks3 roaks3 closed this as completed Jul 31, 2024
Copy link

github-actions bot commented Sep 2, 2024

I'm going to lock this issue 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 similar to this, 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 Sep 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants