The gitlab_user
resource allows to manage the lifecycle of a user.
Upstream API: GitLab REST API docs
resource "gitlab_user" "example" {
name = "Example Foo"
username = "example"
password = "superPassword"
email = "gitlab@user.create"
is_admin = true
projects_limit = 4
can_create_group = false
is_external = true
reset_password = false
}
email
(String) The e-mail address of the user.name
(String) The name of the user.username
(String) The username of the user.can_create_group
(Boolean) Boolean, defaults to false. Whether to allow the user to create groups.is_admin
(Boolean) Boolean, defaults to false. Whether to enable administrative privilegesis_external
(Boolean) Boolean, defaults to false. Whether a user has access only to some internal or private projects. External users can only access projects to which they are explicitly granted access.namespace_id
(Number) The ID of the user's namespace. Available since GitLab 14.10.note
(String) The note associated to the user.password
(String, Sensitive) The password of the user.projects_limit
(Number) Integer, defaults to 0. Number of projects user can create.reset_password
(Boolean) Boolean, defaults to false. Send user password reset link.skip_confirmation
(Boolean) Boolean, defaults to true. Whether to skip confirmation.state
(String) String, defaults to 'active'. The state of the user account. Valid values are active
, deactivated
, blocked
.id
(String) The ID of this resource.Import is supported using the following syntax:
# You can import a user to terraform state using `terraform import <resource> <id>`.
# The `id` must be an integer for the id of the user you want to import,
# for example:
terraform import gitlab_user.example 42