Manage PAT tokens through terraform provider
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Description
It would be very useful to my organisation if were able to manage PAT tokens in Azure DevOps through this terraform provider. Especially since they expire and a PAT token is required to run the provider in the first place.
New or Affected Resource(s)
N/A
Potential Terraform Configuration
resource "azuredevops_pat" "example" {
name = "Example-PAT"
scope = ["read:token,", "build:create"]
}
References
None
@joewragg I am working on adding this functionality which does not exist in the azuredevops-go-api library but I have a PR pending full end-to-end testing and review.
This one might be more difficult than expected. I have successfully tested the API functionality but the method of Authentication is a bit tricky. This feature currently requires an OAuth Token running on behalf of a Service Principal/User. I will need some time to figure out how to generate those for testing.
@joewragg I am working on adding this functionality which does not exist in the azuredevops-go-api library but I have a PR pending full end-to-end testing and review.
Thanks good to hear it's being looked at 👍
Hey everyone, I was wondering if there are any news about the ability to create a PAT via the azuredevops provider?
@Alepernicolo I think it's possible, but not how I was attempting to do it in my fork. Unfortunately my ability to do any extra work has pretty much disappeared. There is a pattern to make calls to the API without updating the library, but I haven't done any testing that this approach will work. There is also some difficulty making the call because it requires an interesting On-Behalf-Of Authentication Flow to execute.