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 support for generating plural datasources #8255

Open
rileykarson opened this issue Jan 20, 2021 · 0 comments
Open

Add support for generating plural datasources #8255

rileykarson opened this issue Jan 20, 2021 · 0 comments
Labels
enhancement forward/exempt Never forward this issue mmv1-generator Provider-wide changes to resource templates or other generator changes new-data-source service/terraform size/xl tpgtools Issues related to the tpgtools generator
Milestone

Comments

@rileykarson
Copy link
Collaborator

rileykarson commented Jan 20, 2021

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

Plural datasources are datasources that call the list endpoint of a resource and return a set of resources. They're most often used for filtering a subset of resources within a project such as those with a certain enum set.

Team thoughts:

  • This should be done on an opt-in basis.
  • Filtering differs between APIs. We either need custom support (preferred) or to do it clientside.
  • Ideally, the resources should be returned in a stable order

New or Affected Resource(s)

  • google_service_resources, eg:
    • google_compute_addresses
    • google_sql_database_instances

Potential Terraform Configuration

data "google_compute_global_addresses" "nat" {
  filter = "purpose=NAT_AUTO AND users:(/${google_compute_router.router.name})"
}

References

@rileykarson rileykarson added new-data-source mmv1-generator Provider-wide changes to resource templates or other generator changes tpgtools Issues related to the tpgtools generator labels Jan 20, 2021
@ghost ghost added the enhancement label Jan 20, 2021
@rileykarson rileykarson added this to the Goals milestone Jan 25, 2021
@melinath melinath changed the title Add support for plural datasources Add support for generating plural datasources Jan 26, 2023
@github-actions github-actions bot added obsolete-service/sqladmin forward/review In review; remove label to forward labels Aug 17, 2023
@roaks3 roaks3 added forward/exempt Never forward this issue and removed forward/review In review; remove label to forward labels Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement forward/exempt Never forward this issue mmv1-generator Provider-wide changes to resource templates or other generator changes new-data-source service/terraform size/xl tpgtools Issues related to the tpgtools generator
Projects
None yet
Development

No branches or pull requests

3 participants