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

Allow autogeneration of singular data sources #12595

Open
melinath opened this issue Sep 19, 2022 · 4 comments
Open

Allow autogeneration of singular data sources #12595

melinath opened this issue Sep 19, 2022 · 4 comments
Labels
enhancement mmv1-generator Provider-wide changes to resource templates or other generator changes service/terraform size/l technical-debt
Milestone

Comments

@melinath
Copy link
Collaborator

melinath commented Sep 19, 2022

Affected Resource(s)

  • google_*

Data sources are currently all handwritten; however, they are fairly simple. We should allow autogeneration so that we can more cheaply support the existing data sources and also more easily add new ones.

@melinath melinath added enhancement technical-debt mmv1-generator Provider-wide changes to resource templates or other generator changes labels Sep 19, 2022
@rileykarson rileykarson added this to the Goals milestone Sep 26, 2022
@rileykarson
Copy link
Collaborator

Discussed in chat recently after @ScottSuarez brought this up. Context from there: most singular datasources (i.e. data.google_compute_address are of limited utility, and this has not proven the best use of our time to work on. Plural datasources (i.e. data.google_compute_addresses) would be slightly more useful in conventional configurations.

The most value comes from custom datasources generally, though, without corresponding resources.

@ScottSuarez
Copy link
Collaborator

ScottSuarez commented May 15, 2023

My concern with datasources implemented manually is that sometimes they don't use the resource read or even schema. This leads to datasources becoming out of date with resource implementation. I would rather have flag to flip to turn on
datasource* generation if we want to keep it an opt-in thing. Thus ensuring consistency in implementation design and less foreseeable maintenance.

@rileykarson
Copy link
Collaborator

Yes, older datasources were handwritten. We avoid those now for the reasons you've mentioned and use the datasource wrapper for singular datasources. That's a separate topic than my comment which addresses why generating these has not been particularly high priority- singular datasources are not particularly valuable for end users in most cases.

I would rather have flag to flip to turn on dataset generation if we want to keep it an opt-in thing.

Datasource?

@ScottSuarez
Copy link
Collaborator

mistype, mm gotcha !

@melinath melinath changed the title Allow autogeneration of data sources Allow autogeneration of singular data sources Aug 21, 2024
modular-magician added a commit to modular-magician/terraform-provider-google that referenced this issue Dec 20, 2024
[upstream:a5e8c7442c627a828f951efde1e99c300ecd44bd]

Signed-off-by: Modular Magician <[email protected]>
modular-magician added a commit that referenced this issue Dec 20, 2024
[upstream:a5e8c7442c627a828f951efde1e99c300ecd44bd]

Signed-off-by: Modular Magician <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement mmv1-generator Provider-wide changes to resource templates or other generator changes service/terraform size/l technical-debt
Projects
None yet
Development

No branches or pull requests

3 participants