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

Feature Request > GitHub App authentication support #514

Closed
kuwas opened this issue Jul 15, 2020 · 7 comments · Fixed by #753
Closed

Feature Request > GitHub App authentication support #514

kuwas opened this issue Jul 15, 2020 · 7 comments · Fixed by #753
Labels
Provider Type: Feature New feature or request

Comments

@kuwas
Copy link

kuwas commented Jul 15, 2020

Terraform Version

v0.13.0-beta3

Affected Resource(s)

  • provider configuration

Terraform Configuration Files

provider "github" {
  app_id          = var.app_id
  private_key_pem = var.private_key_pem
}

Debug Output

n/a, this feature doesn't exist

Panic Output

n/a, this feature doesn't exist

Expected Behavior

Terraform authenticates as a GitHub App, this removes the need of making a bot GitHub account for terraform usage

Actual Behavior

n/a, this feature doesn't exist

Steps to Reproduce

n/a, this feature doesn't exist

Important Factoids

References

@kuwas kuwas changed the title Feature Request > support GitHub App authentication Feature Request > GitHub App authentication support Jul 15, 2020
@dutsmiller
Copy link

dutsmiller commented Aug 5, 2020

I would add that it would be nice to be able to use repository deployment keys in the same fashion. While this would limit the overall functionality of the provider, it would be nice to not have to tie the use of the provider to a specific user account.

@patrickmarabeas
Copy link
Contributor

patrickmarabeas commented Nov 11, 2020

It's been on my list to port over - but you can use this provider to auth via Github App, and feed the token into the official Github Terraform provider:

Provider schema: https://github.com/patrickmarabeas/terraform-provider-github-v4/blob/master/github-v4/provider.go#L31

Access the token: https://github.com/patrickmarabeas/terraform-provider-github-v4/blob/master/github-v4/data_source_github_token.go

Beware of the differences in auth and access that Github Apps have.

@jcudit jcudit added Type: Feature New feature or request Provider labels Nov 26, 2020
@jcudit
Copy link
Contributor

jcudit commented Nov 26, 2020

Very interested in seeing this one ship. Thanks for getting the discussion started!

@patrickmarabeas
Copy link
Contributor

I'll start working on integrating the functionality: https://github.com/terraform-providers/terraform-provider-github/pull/613

@jspiro
Copy link
Contributor

jspiro commented Mar 30, 2021

Is there a simple string I can generate by hand that encodes OAuth2 info in it that will drop-in work in the existing provider? The docs say

token - (Optional) A GitHub OAuth / Personal Access Token. When not provided or made available via the GITHUB_TOKEN environment variable, the provider can only access resources available anonymously.

But I can't figure out what to give it. We're not OAuth2 knowledgable here, so any help or examples would be deeply appreciated. We're hitting our API limits constantly and need to switch over to the GitHub VCS connection established by Terraform.io.

@alloveras
Copy link
Contributor

alloveras commented Apr 5, 2021

Hey @patrickmarabeas,
It seems like the link to your PR above is broken (perhaps you ended up discarding it? 😃 )

I started a new one from scratch here. This message is just to make sure we aren't duplicating efforts 😉

@patrickmarabeas
Copy link
Contributor

@alloveras yeah they moved the repo. I haven't done much more, so sweet as 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Provider Type: Feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants