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

[FEAT]: Manage github personal access tokens (PATs) with terraform

Open nitrocode opened this issue 1 year ago • 2 comments

Describe the need

I'd like to create and manage permissions of personal access tokens for a service account with terraform

In cloudflare, in a service user account, I issued a user-management token, and then use cloudflare_api_token to create other tokens and manage their permissions as well as allowed IPs that can use this token. After the token is created, I can save it in AWS SSM store.

We can do this in AWS and in cloudflare and I'd like to do this with github as well.

Thanks!

https://stackoverflow.com/questions/41879286/get-a-token-by-github-api

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

nitrocode avatar Aug 23 '24 17:08 nitrocode

That StackOverflow link is interesting. Is that API public? I can't seem to find docs about it, and I didn't think we supported such an API.

kfcampbell avatar Aug 30 '24 18:08 kfcampbell

Seconding this, as it would be helpful in order to have terraform setting up GitHub integrations on other systems (Snyk to take an example), where I'd like to be able to automate tainting and rotation of any such tokens easily using Terraform.

MPV avatar Oct 17 '24 08:10 MPV

That API has unfortunately been revoked. If you can help petition github to make a replacement, please do.

gilbahat avatar Jan 31 '25 08:01 gilbahat

How can we petition Github?

a-nldisr avatar Oct 28 '25 07:10 a-nldisr