terraform-provider-github icon indicating copy to clipboard operation
terraform-provider-github copied to clipboard

[FEAT]: GitHub App creation via terraform

Open alexvanderberkel opened this issue 1 year ago • 4 comments

Describe the need

Hi all,

thanks for the splendid work on this terraform provider so far :-)

The terraform provider currently does not allow / lacking the feature of creating of GitHub apps. The provider should be capable of creating GitHub apps in the selected GitHub organization and as such reduce the manual effort to create GitHub Apps but rather use automation for this kind of behavior.

This would help to manage the number of apps installed in an organization.

If possible it would be nice if the permission of the GitHub app on different repositories can be set, e.g. read on repo a, write on repo B.

Currently, only the following is possible: https://registry.terraform.io/providers/integrations/github/latest/docs/resources/app_installation_repositories

SDK Version

No response

API Version

No response

Relevant log output

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

alexvanderberkel avatar Sep 16 '24 12:09 alexvanderberkel

Hey @alexvanderberkel,

Thanks for reaching out. Since there are APIs available to help users manage Apps this should be a doable thing. Is this something that you'd be interested in implementing?

I've added the up for grabs label just in case someone from the community is interested in doing it as well. Thank you for bringing this up - it seems like it would be a great addition!

nickfloyd avatar Sep 16 '24 18:09 nickfloyd

So far I have not written any code for a provider yet.

alexvanderberkel avatar Sep 17 '24 14:09 alexvanderberkel

Came across this when creating another issue - we have investigated this and concluded it's not possible to have a fully hands-off app creation experience. The only App creation API that exists is create from manifest which is a subset of the whole app manifest flow. This involves redirecting between sites in a browser, calling that API with a code returned and user credentials to create/install the app.

Best we could do was a static webpage where a user could click a few buttons to create the App via manifest and install it on the organisation, then download the id and key. Hoping to be proven wrong, but fully automated API driven org app creation doesn't seem possible.

srgustafson8 avatar Sep 20 '24 10:09 srgustafson8

That does not sound to promising.

alexvanderberkel avatar Sep 20 '24 14:09 alexvanderberkel

This is a duplicate of https://github.com/integrations/terraform-provider-github/issues/509

lewismiddleton avatar Jan 13 '25 18:01 lewismiddleton

👋 Hey Friends, this issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!

github-actions[bot] avatar Oct 11 '25 02:10 github-actions[bot]