New data source project access tokens
New Data Source
We want a data source which returns all project access tokens of a given project. This is possible via API, and also already implemented in the client-go library.
This would help us monitor which tokens exists.
I noticed there is such a data source for group access token already, but could not find an issue for project access token.
Example config:
data "gitlab_project_access_tokens" "this" {
project = "mygroup/myproject" # should also support project id
}
Related GitLab APIs
API documentation: https://docs.gitlab.com/api/project_access_tokens/#list-all-project-access-tokens
Additional Details
-
GitLab REST API resources available (read for data sources, CRUD for resources) -
client-go supports the related GitLab API already -
I'd like to contribute it myself
Edited by Ruben Aleman