Add Users API field `force_random_password` for user creation

Field force_random_password for POST /users API

I'm missing an API field when creating some users

I'm looking for something that I could use like this:

resource "gitlab_user" "some_user" {
  name = "test"
  username = "test"
  email = "test@example.com"
  can_create_group = false
  is_external      = false
  force_random_password = true
}

Related GitLab APIs

API documentation: https://docs.gitlab.com/api/users/#create-a-user

Additional Details

  • GitLab REST API resources available (read for data sources, CRUD for resources)
  • client-go supports the related GitLab API already: CreateUserOptions.ForceRandomPassword
  • I'd like to contribute it myself
Edited by Lyonel Martinez