1. Packages
  2. Gitlab Provider
  3. API Docs
  4. User
GitLab v8.10.0 published on Friday, Mar 21, 2025 by Pulumi

gitlab.User

Explore with Pulumi AI

The gitlab.User resource allows to manage the lifecycle of a user.

the provider needs to be configured with admin-level access for this resource to work.

You must specify either password or reset_password.

Upstream API: GitLab REST API docs

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";

const example = new gitlab.User("example", {
    name: "Example Foo",
    username: "example",
    password: "superPassword",
    email: "gitlab@user.create",
    isAdmin: true,
    projectsLimit: 4,
    canCreateGroup: false,
    isExternal: true,
    resetPassword: false,
});
Copy
import pulumi
import pulumi_gitlab as gitlab

example = 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)
Copy
package main

import (
	"github.com/pulumi/pulumi-gitlab/sdk/v8/go/gitlab"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := gitlab.NewUser(ctx, "example", &gitlab.UserArgs{
			Name:           pulumi.String("Example Foo"),
			Username:       pulumi.String("example"),
			Password:       pulumi.String("superPassword"),
			Email:          pulumi.String("gitlab@user.create"),
			IsAdmin:        pulumi.Bool(true),
			ProjectsLimit:  pulumi.Int(4),
			CanCreateGroup: pulumi.Bool(false),
			IsExternal:     pulumi.Bool(true),
			ResetPassword:  pulumi.Bool(false),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;

return await Deployment.RunAsync(() => 
{
    var example = new GitLab.User("example", new()
    {
        Name = "Example Foo",
        Username = "example",
        Password = "superPassword",
        Email = "gitlab@user.create",
        IsAdmin = true,
        ProjectsLimit = 4,
        CanCreateGroup = false,
        IsExternal = true,
        ResetPassword = false,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gitlab.User;
import com.pulumi.gitlab.UserArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new User("example", UserArgs.builder()
            .name("Example Foo")
            .username("example")
            .password("superPassword")
            .email("gitlab@user.create")
            .isAdmin(true)
            .projectsLimit(4)
            .canCreateGroup(false)
            .isExternal(true)
            .resetPassword(false)
            .build());

    }
}
Copy
resources:
  example:
    type: gitlab:User
    properties:
      name: Example Foo
      username: example
      password: superPassword
      email: gitlab@user.create
      isAdmin: true
      projectsLimit: 4
      canCreateGroup: false
      isExternal: true
      resetPassword: false
Copy

Create User Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new User(name: string, args: UserArgs, opts?: CustomResourceOptions);
@overload
def User(resource_name: str,
         args: UserArgs,
         opts: Optional[ResourceOptions] = None)

@overload
def User(resource_name: str,
         opts: Optional[ResourceOptions] = None,
         username: Optional[str] = None,
         email: Optional[str] = None,
         namespace_id: Optional[int] = None,
         note: Optional[str] = None,
         force_random_password: Optional[bool] = None,
         is_admin: Optional[bool] = None,
         is_external: Optional[bool] = None,
         name: Optional[str] = None,
         can_create_group: Optional[bool] = None,
         external_provider: Optional[str] = None,
         password: Optional[str] = None,
         projects_limit: Optional[int] = None,
         reset_password: Optional[bool] = None,
         skip_confirmation: Optional[bool] = None,
         state: Optional[str] = None,
         extern_uid: Optional[str] = None)
func NewUser(ctx *Context, name string, args UserArgs, opts ...ResourceOption) (*User, error)
public User(string name, UserArgs args, CustomResourceOptions? opts = null)
public User(String name, UserArgs args)
public User(String name, UserArgs args, CustomResourceOptions options)
type: gitlab:User
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. UserArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. UserArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. UserArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. UserArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. UserArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var userResource = new GitLab.User("userResource", new()
{
    Username = "string",
    Email = "string",
    NamespaceId = 0,
    Note = "string",
    ForceRandomPassword = false,
    IsAdmin = false,
    IsExternal = false,
    Name = "string",
    CanCreateGroup = false,
    Password = "string",
    ProjectsLimit = 0,
    ResetPassword = false,
    SkipConfirmation = false,
    State = "string",
});
Copy
example, err := gitlab.NewUser(ctx, "userResource", &gitlab.UserArgs{
	Username:            pulumi.String("string"),
	Email:               pulumi.String("string"),
	NamespaceId:         pulumi.Int(0),
	Note:                pulumi.String("string"),
	ForceRandomPassword: pulumi.Bool(false),
	IsAdmin:             pulumi.Bool(false),
	IsExternal:          pulumi.Bool(false),
	Name:                pulumi.String("string"),
	CanCreateGroup:      pulumi.Bool(false),
	Password:            pulumi.String("string"),
	ProjectsLimit:       pulumi.Int(0),
	ResetPassword:       pulumi.Bool(false),
	SkipConfirmation:    pulumi.Bool(false),
	State:               pulumi.String("string"),
})
Copy
var userResource = new User("userResource", UserArgs.builder()
    .username("string")
    .email("string")
    .namespaceId(0)
    .note("string")
    .forceRandomPassword(false)
    .isAdmin(false)
    .isExternal(false)
    .name("string")
    .canCreateGroup(false)
    .password("string")
    .projectsLimit(0)
    .resetPassword(false)
    .skipConfirmation(false)
    .state("string")
    .build());
Copy
user_resource = gitlab.User("userResource",
    username="string",
    email="string",
    namespace_id=0,
    note="string",
    force_random_password=False,
    is_admin=False,
    is_external=False,
    name="string",
    can_create_group=False,
    password="string",
    projects_limit=0,
    reset_password=False,
    skip_confirmation=False,
    state="string")
Copy
const userResource = new gitlab.User("userResource", {
    username: "string",
    email: "string",
    namespaceId: 0,
    note: "string",
    forceRandomPassword: false,
    isAdmin: false,
    isExternal: false,
    name: "string",
    canCreateGroup: false,
    password: "string",
    projectsLimit: 0,
    resetPassword: false,
    skipConfirmation: false,
    state: "string",
});
Copy
type: gitlab:User
properties:
    canCreateGroup: false
    email: string
    forceRandomPassword: false
    isAdmin: false
    isExternal: false
    name: string
    namespaceId: 0
    note: string
    password: string
    projectsLimit: 0
    resetPassword: false
    skipConfirmation: false
    state: string
    username: string
Copy

User Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The User resource accepts the following input properties:

Email This property is required. string
The e-mail address of the user.
Username This property is required. string
The username of the user.
CanCreateGroup bool
Boolean, defaults to false. Whether to allow the user to create groups.
ExternUid string
String, a specific external authentication provider UID.

Deprecated: To be removed in 18.0. Use gitlab.UserIdentity resource instead. See https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/issues/1295

ExternalProvider string
String, the external provider.

Deprecated: To be removed in 18.0. Use gitlab.UserIdentity resource instead. See https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/issues/1295

ForceRandomPassword Changes to this property will trigger replacement. bool
Set user password to a random value
IsAdmin bool
Boolean, defaults to false. Whether to enable administrative privileges
IsExternal bool
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.
Name string
The name of the user.
NamespaceId int
The ID of the user's namespace.
Note string
The note associated to the user.
Password Changes to this property will trigger replacement. string
The password of the user.
ProjectsLimit int
Integer, defaults to 0. Number of projects user can create.
ResetPassword Changes to this property will trigger replacement. bool
Boolean, defaults to false. Send user password reset link.
SkipConfirmation Changes to this property will trigger replacement. bool
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.
Email This property is required. string
The e-mail address of the user.
Username This property is required. string
The username of the user.
CanCreateGroup bool
Boolean, defaults to false. Whether to allow the user to create groups.
ExternUid string
String, a specific external authentication provider UID.

Deprecated: To be removed in 18.0. Use gitlab.UserIdentity resource instead. See https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/issues/1295

ExternalProvider string
String, the external provider.

Deprecated: To be removed in 18.0. Use gitlab.UserIdentity resource instead. See https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/issues/1295

ForceRandomPassword Changes to this property will trigger replacement. bool
Set user password to a random value
IsAdmin bool
Boolean, defaults to false. Whether to enable administrative privileges
IsExternal bool
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.
Name string
The name of the user.
NamespaceId int
The ID of the user's namespace.
Note string
The note associated to the user.
Password Changes to this property will trigger replacement. string
The password of the user.
ProjectsLimit int
Integer, defaults to 0. Number of projects user can create.
ResetPassword Changes to this property will trigger replacement. bool
Boolean, defaults to false. Send user password reset link.
SkipConfirmation Changes to this property will trigger replacement. bool
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.
email This property is required. String
The e-mail address of the user.
username This property is required. String
The username of the user.
canCreateGroup Boolean
Boolean, defaults to false. Whether to allow the user to create groups.
externUid String
String, a specific external authentication provider UID.

Deprecated: To be removed in 18.0. Use gitlab.UserIdentity resource instead. See https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/issues/1295

externalProvider String
String, the external provider.

Deprecated: To be removed in 18.0. Use gitlab.UserIdentity resource instead. See https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/issues/1295

forceRandomPassword Changes to this property will trigger replacement. Boolean
Set user password to a random value
isAdmin Boolean
Boolean, defaults to false. Whether to enable administrative privileges
isExternal 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.
name String
The name of the user.
namespaceId Integer
The ID of the user's namespace.
note String
The note associated to the user.
password Changes to this property will trigger replacement. String
The password of the user.
projectsLimit Integer
Integer, defaults to 0. Number of projects user can create.
resetPassword Changes to this property will trigger replacement. Boolean
Boolean, defaults to false. Send user password reset link.
skipConfirmation Changes to this property will trigger replacement. 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.
email This property is required. string
The e-mail address of the user.
username This property is required. string
The username of the user.
canCreateGroup boolean
Boolean, defaults to false. Whether to allow the user to create groups.
externUid string
String, a specific external authentication provider UID.

Deprecated: To be removed in 18.0. Use gitlab.UserIdentity resource instead. See https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/issues/1295

externalProvider string
String, the external provider.

Deprecated: To be removed in 18.0. Use gitlab.UserIdentity resource instead. See https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/issues/1295

forceRandomPassword Changes to this property will trigger replacement. boolean
Set user password to a random value
isAdmin boolean
Boolean, defaults to false. Whether to enable administrative privileges
isExternal 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.
name string
The name of the user.
namespaceId number
The ID of the user's namespace.
note string
The note associated to the user.
password Changes to this property will trigger replacement. string
The password of the user.
projectsLimit number
Integer, defaults to 0. Number of projects user can create.
resetPassword Changes to this property will trigger replacement. boolean
Boolean, defaults to false. Send user password reset link.
skipConfirmation Changes to this property will trigger replacement. 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.
email This property is required. str
The e-mail address of the user.
username This property is required. str
The username of the user.
can_create_group bool
Boolean, defaults to false. Whether to allow the user to create groups.
extern_uid str
String, a specific external authentication provider UID.

Deprecated: To be removed in 18.0. Use gitlab.UserIdentity resource instead. See https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/issues/1295

external_provider str
String, the external provider.

Deprecated: To be removed in 18.0. Use gitlab.UserIdentity resource instead. See https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/issues/1295

force_random_password Changes to this property will trigger replacement. bool
Set user password to a random value
is_admin bool
Boolean, defaults to false. Whether to enable administrative privileges
is_external bool
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.
name str
The name of the user.
namespace_id int
The ID of the user's namespace.
note str
The note associated to the user.
password Changes to this property will trigger replacement. str
The password of the user.
projects_limit int
Integer, defaults to 0. Number of projects user can create.
reset_password Changes to this property will trigger replacement. bool
Boolean, defaults to false. Send user password reset link.
skip_confirmation Changes to this property will trigger replacement. bool
Boolean, defaults to true. Whether to skip confirmation.
state str
String, defaults to 'active'. The state of the user account. Valid values are active, deactivated, blocked.
email This property is required. String
The e-mail address of the user.
username This property is required. String
The username of the user.
canCreateGroup Boolean
Boolean, defaults to false. Whether to allow the user to create groups.
externUid String
String, a specific external authentication provider UID.

Deprecated: To be removed in 18.0. Use gitlab.UserIdentity resource instead. See https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/issues/1295

externalProvider String
String, the external provider.

Deprecated: To be removed in 18.0. Use gitlab.UserIdentity resource instead. See https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/issues/1295

forceRandomPassword Changes to this property will trigger replacement. Boolean
Set user password to a random value
isAdmin Boolean
Boolean, defaults to false. Whether to enable administrative privileges
isExternal 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.
name String
The name of the user.
namespaceId Number
The ID of the user's namespace.
note String
The note associated to the user.
password Changes to this property will trigger replacement. String
The password of the user.
projectsLimit Number
Integer, defaults to 0. Number of projects user can create.
resetPassword Changes to this property will trigger replacement. Boolean
Boolean, defaults to false. Send user password reset link.
skipConfirmation Changes to this property will trigger replacement. 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.

Outputs

All input properties are implicitly available as output properties. Additionally, the User resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing User Resource

Get an existing User resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: UserState, opts?: CustomResourceOptions): User
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        can_create_group: Optional[bool] = None,
        email: Optional[str] = None,
        extern_uid: Optional[str] = None,
        external_provider: Optional[str] = None,
        force_random_password: Optional[bool] = None,
        is_admin: Optional[bool] = None,
        is_external: Optional[bool] = None,
        name: Optional[str] = None,
        namespace_id: Optional[int] = None,
        note: Optional[str] = None,
        password: Optional[str] = None,
        projects_limit: Optional[int] = None,
        reset_password: Optional[bool] = None,
        skip_confirmation: Optional[bool] = None,
        state: Optional[str] = None,
        username: Optional[str] = None) -> User
func GetUser(ctx *Context, name string, id IDInput, state *UserState, opts ...ResourceOption) (*User, error)
public static User Get(string name, Input<string> id, UserState? state, CustomResourceOptions? opts = null)
public static User get(String name, Output<String> id, UserState state, CustomResourceOptions options)
resources:  _:    type: gitlab:User    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
CanCreateGroup bool
Boolean, defaults to false. Whether to allow the user to create groups.
Email string
The e-mail address of the user.
ExternUid string
String, a specific external authentication provider UID.

Deprecated: To be removed in 18.0. Use gitlab.UserIdentity resource instead. See https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/issues/1295

ExternalProvider string
String, the external provider.

Deprecated: To be removed in 18.0. Use gitlab.UserIdentity resource instead. See https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/issues/1295

ForceRandomPassword Changes to this property will trigger replacement. bool
Set user password to a random value
IsAdmin bool
Boolean, defaults to false. Whether to enable administrative privileges
IsExternal bool
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.
Name string
The name of the user.
NamespaceId int
The ID of the user's namespace.
Note string
The note associated to the user.
Password Changes to this property will trigger replacement. string
The password of the user.
ProjectsLimit int
Integer, defaults to 0. Number of projects user can create.
ResetPassword Changes to this property will trigger replacement. bool
Boolean, defaults to false. Send user password reset link.
SkipConfirmation Changes to this property will trigger replacement. bool
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.
Username string
The username of the user.
CanCreateGroup bool
Boolean, defaults to false. Whether to allow the user to create groups.
Email string
The e-mail address of the user.
ExternUid string
String, a specific external authentication provider UID.

Deprecated: To be removed in 18.0. Use gitlab.UserIdentity resource instead. See https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/issues/1295

ExternalProvider string
String, the external provider.

Deprecated: To be removed in 18.0. Use gitlab.UserIdentity resource instead. See https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/issues/1295

ForceRandomPassword Changes to this property will trigger replacement. bool
Set user password to a random value
IsAdmin bool
Boolean, defaults to false. Whether to enable administrative privileges
IsExternal bool
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.
Name string
The name of the user.
NamespaceId int
The ID of the user's namespace.
Note string
The note associated to the user.
Password Changes to this property will trigger replacement. string
The password of the user.
ProjectsLimit int
Integer, defaults to 0. Number of projects user can create.
ResetPassword Changes to this property will trigger replacement. bool
Boolean, defaults to false. Send user password reset link.
SkipConfirmation Changes to this property will trigger replacement. bool
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.
Username string
The username of the user.
canCreateGroup Boolean
Boolean, defaults to false. Whether to allow the user to create groups.
email String
The e-mail address of the user.
externUid String
String, a specific external authentication provider UID.

Deprecated: To be removed in 18.0. Use gitlab.UserIdentity resource instead. See https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/issues/1295

externalProvider String
String, the external provider.

Deprecated: To be removed in 18.0. Use gitlab.UserIdentity resource instead. See https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/issues/1295

forceRandomPassword Changes to this property will trigger replacement. Boolean
Set user password to a random value
isAdmin Boolean
Boolean, defaults to false. Whether to enable administrative privileges
isExternal 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.
name String
The name of the user.
namespaceId Integer
The ID of the user's namespace.
note String
The note associated to the user.
password Changes to this property will trigger replacement. String
The password of the user.
projectsLimit Integer
Integer, defaults to 0. Number of projects user can create.
resetPassword Changes to this property will trigger replacement. Boolean
Boolean, defaults to false. Send user password reset link.
skipConfirmation Changes to this property will trigger replacement. 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.
username String
The username of the user.
canCreateGroup boolean
Boolean, defaults to false. Whether to allow the user to create groups.
email string
The e-mail address of the user.
externUid string
String, a specific external authentication provider UID.

Deprecated: To be removed in 18.0. Use gitlab.UserIdentity resource instead. See https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/issues/1295

externalProvider string
String, the external provider.

Deprecated: To be removed in 18.0. Use gitlab.UserIdentity resource instead. See https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/issues/1295

forceRandomPassword Changes to this property will trigger replacement. boolean
Set user password to a random value
isAdmin boolean
Boolean, defaults to false. Whether to enable administrative privileges
isExternal 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.
name string
The name of the user.
namespaceId number
The ID of the user's namespace.
note string
The note associated to the user.
password Changes to this property will trigger replacement. string
The password of the user.
projectsLimit number
Integer, defaults to 0. Number of projects user can create.
resetPassword Changes to this property will trigger replacement. boolean
Boolean, defaults to false. Send user password reset link.
skipConfirmation Changes to this property will trigger replacement. 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.
username string
The username of the user.
can_create_group bool
Boolean, defaults to false. Whether to allow the user to create groups.
email str
The e-mail address of the user.
extern_uid str
String, a specific external authentication provider UID.

Deprecated: To be removed in 18.0. Use gitlab.UserIdentity resource instead. See https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/issues/1295

external_provider str
String, the external provider.

Deprecated: To be removed in 18.0. Use gitlab.UserIdentity resource instead. See https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/issues/1295

force_random_password Changes to this property will trigger replacement. bool
Set user password to a random value
is_admin bool
Boolean, defaults to false. Whether to enable administrative privileges
is_external bool
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.
name str
The name of the user.
namespace_id int
The ID of the user's namespace.
note str
The note associated to the user.
password Changes to this property will trigger replacement. str
The password of the user.
projects_limit int
Integer, defaults to 0. Number of projects user can create.
reset_password Changes to this property will trigger replacement. bool
Boolean, defaults to false. Send user password reset link.
skip_confirmation Changes to this property will trigger replacement. bool
Boolean, defaults to true. Whether to skip confirmation.
state str
String, defaults to 'active'. The state of the user account. Valid values are active, deactivated, blocked.
username str
The username of the user.
canCreateGroup Boolean
Boolean, defaults to false. Whether to allow the user to create groups.
email String
The e-mail address of the user.
externUid String
String, a specific external authentication provider UID.

Deprecated: To be removed in 18.0. Use gitlab.UserIdentity resource instead. See https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/issues/1295

externalProvider String
String, the external provider.

Deprecated: To be removed in 18.0. Use gitlab.UserIdentity resource instead. See https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/issues/1295

forceRandomPassword Changes to this property will trigger replacement. Boolean
Set user password to a random value
isAdmin Boolean
Boolean, defaults to false. Whether to enable administrative privileges
isExternal 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.
name String
The name of the user.
namespaceId Number
The ID of the user's namespace.
note String
The note associated to the user.
password Changes to this property will trigger replacement. String
The password of the user.
projectsLimit Number
Integer, defaults to 0. Number of projects user can create.
resetPassword Changes to this property will trigger replacement. Boolean
Boolean, defaults to false. Send user password reset link.
skipConfirmation Changes to this property will trigger replacement. 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.
username String
The username of the user.

Import

Starting in Terraform v1.5.0 you can use an import block to import gitlab_user. For example:

terraform

import {

to = gitlab_user.example

id = “see CLI command below for ID”

}

Import using the CLI is supported using the following syntax:

$ pulumi import gitlab:index/user:User You can import a user to terraform state using `<resource> <id>`.
Copy

The id must be an integer for the id of the user you want to import,

for example:

$ pulumi import gitlab:index/user:User example 42
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
GitLab pulumi/pulumi-gitlab
License
Apache-2.0
Notes
This Pulumi package is based on the gitlab Terraform Provider.