User accounts¶
gitlab_settings_users is a list of user account entries keyed by
username. Each entry converges one account: creation with a derived or
declared credential policy, attribute convergence, the block/unblock
lifecycle, and deletion. Managing users requires an administrator
credential.
Users plan before groups and projects
In a gitlab_settings_resource: all apply, user operations plan and
apply ahead of groups and projects, so a membership can reference a
username created in the same run. state: absent deletes the account —
GitLab performs the deletion asynchronously, so an immediately repeated
check may briefly still observe the account.
Example¶
gitlab_settings_users:
- username: alice
user:
name: Alice Example
email: alice@example.com
force_random_password: true
can_create_group: false
- username: bob
custom_attributes:
team: platform
user:
state: blocked # offboarding: block an existing account
- username: mallory
state: absent # delete the account
User Entry Spec¶
|
The account's natural identity; GitLab's numeric id is resolved through the API. | Example: |
|
User-entry lifecycle. Can be one of: Default: | Example: |
|
Rewrite the declared password on an existing account. Passwords are never compared or implicitly rewritten. Default: | Example: |
|
Arbitrary key/value metadata, reconciled per key like group and project custom attributes ([Custom attributes API](https://docs.gitlab.com/api/custom_attributes/)). The user's numeric id is resolved before any request. Properties of
| Example: |
|
Account attributes and account-state controls. Unsupported fields are rejected with the field name in the error. Properties of
| Example: |