microsoft / terraform-provider-azuredevops

Terraform Azure DevOps provider
https://www.terraform.io/docs/providers/azuredevops/
MIT License
387 stars 279 forks source link

Manage PAT tokens through terraform provider #1090

Open joewragg opened 4 months ago

joewragg commented 4 months ago

Community Note

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

cparkins commented 3 months ago

@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.

cparkins commented 3 months ago

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 commented 2 months ago

@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 👍