Skip to content

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

Edited by Ruben Aleman