integrations / terraform-provider-github

Terraform GitHub provider
https://www.terraform.io/docs/providers/github/
MIT License
863 stars 708 forks source link

[FEAT]: data github_repositories should return better structure #2300

Open uthark opened 1 week ago

uthark commented 1 week ago

Describe the need

Currently it returns 3 individual list with full_names, names and repo_ids. I need to map repo name to the repo id, but I'm not sure if the returned data is consistently ordered.

Ideally, return a list of maps and each map would have repo information to use.

The use-case: I need to configure access to org level secret and resource github_actions_organization_secret_repositories requires to pass repo ids, but from the configuaration perspective we want to pass repo names.

So we need to resolve repo id from its' name. To reduce the load on gh api we'd like to use data.github_repositories, but resulting data is hard to use / docs don't make guarantee that returned list match.

SDK Version

No response

API Version

No response

Relevant log output

No response

Code of Conduct