gitlab_project_access_token: Support different access_level

Created by: MrLuje

Feature Description

When creating gitlab_project_access_token through the provider, the generated user associated to the token is added with "maintainer" role to the project and there is no way to specify the role.

This parameter is supported by the gitlab api (gitlab_project_access_token)

Attribute Type required Description
access_level Integer no A valid access level. Default value is 40 (Maintainer). Other allowed values are 10 (Guest), 20 (Reporter), and 30 (Developer).

Example :

resource "gitlab_project_access_token" "bar" {
  name = "my project token"
  project = "project"  
  expires_at = "2022-04-01"
  scopes = ["read_repository" , "api", "write_repository", "read_api"]

  access_level = "reporter"   #<--- new 
}

Do you want to implement this?

  • I would like to implement this myself 👷
Edited by Timo Furrer