-
Notifications
You must be signed in to change notification settings - Fork 160
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
Oauth Token Data Source would be very helpful #10
Comments
@djaboxx that is definitely something we will add in a next release! |
For those who are trying to do what @djaboxx is referring to. You can use the following to get a list of valid oauth_token_ids, you can do so by running through the following: https://www.terraform.io/docs/enterprise/api/oauth-tokens.html#list-oauth-tokens Documentation doesn't cover how to get this information. |
This will work, but the challenge is that the IDs are not uniquely identifiable. So if you have multiple connections it could be required to test them one by one to find the one that you need. But for now this seems to be the only solution while we are working to improve this in the TFE backend. |
Another "me too" vote. In fact, I'd like to see data sources for most/all of the The ones I'm specifically interested in are:
|
This public gist is a script that I've been using to find my oauth_tokens. There may be some bugs, if there are, please let me know and I will fix. It should look by provider and username as well as just finding the first available token. While it is true that the same user could upload different VCS connections for the same provider that are tied to different permissions, that's probably somewhat rare and therefor this script should be helpful. https://gist.github.com/djaboxx/b9cfe2b87735957af86dcdd24fac491a I've also used this custom module, it's been very helpful. |
Added in #212 |
Currently, I'm having to find the Oauth Token ID outside of Terraform. It would be very helpful if this could be part of the Terraform workflow.
Having a Data Source that looks this up would solve the problem.
The text was updated successfully, but these errors were encountered: