1. Packages
  2. Zitadel
  3. API Docs
  4. HumanUser
zitadel v0.2.0 published on Monday, Mar 24, 2025 by pulumiverse

zitadel.HumanUser

Explore with Pulumi AI

Caution: Email can only be set verified if a password is set for the user, either with initial_password or during runtime

Resource representing a human user situated under an organization, which then can be authorized through memberships or direct grants on other resources.

Example Usage

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Zitadel = Pulumiverse.Zitadel;

return await Deployment.RunAsync(() => 
{
    var @default = new Zitadel.HumanUser("default", new()
    {
        OrgId = defaultZitadelOrg.Id,
        UserName = "humanfull@localhost.com",
        FirstName = "firstname",
        LastName = "lastname",
        NickName = "nickname",
        DisplayName = "displayname",
        PreferredLanguage = "de",
        Gender = "GENDER_MALE",
        Phone = "+41799999999",
        IsPhoneVerified = true,
        Email = "test@zitadel.com",
        IsEmailVerified = true,
        InitialPassword = "Password1!",
    });

});
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-zitadel/sdk/go/zitadel"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := zitadel.NewHumanUser(ctx, "default", &zitadel.HumanUserArgs{
			OrgId:             pulumi.Any(defaultZitadelOrg.Id),
			UserName:          pulumi.String("humanfull@localhost.com"),
			FirstName:         pulumi.String("firstname"),
			LastName:          pulumi.String("lastname"),
			NickName:          pulumi.String("nickname"),
			DisplayName:       pulumi.String("displayname"),
			PreferredLanguage: pulumi.String("de"),
			Gender:            pulumi.String("GENDER_MALE"),
			Phone:             pulumi.String("+41799999999"),
			IsPhoneVerified:   pulumi.Bool(true),
			Email:             pulumi.String("test@zitadel.com"),
			IsEmailVerified:   pulumi.Bool(true),
			InitialPassword:   pulumi.String("Password1!"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.zitadel.HumanUser;
import com.pulumi.zitadel.HumanUserArgs;
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 default_ = new HumanUser("default", HumanUserArgs.builder()        
            .orgId(defaultZitadelOrg.id())
            .userName("humanfull@localhost.com")
            .firstName("firstname")
            .lastName("lastname")
            .nickName("nickname")
            .displayName("displayname")
            .preferredLanguage("de")
            .gender("GENDER_MALE")
            .phone("+41799999999")
            .isPhoneVerified(true)
            .email("test@zitadel.com")
            .isEmailVerified(true)
            .initialPassword("Password1!")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as zitadel from "@pulumiverse/zitadel";

const _default = new zitadel.HumanUser("default", {
    orgId: defaultZitadelOrg.id,
    userName: "humanfull@localhost.com",
    firstName: "firstname",
    lastName: "lastname",
    nickName: "nickname",
    displayName: "displayname",
    preferredLanguage: "de",
    gender: "GENDER_MALE",
    phone: "+41799999999",
    isPhoneVerified: true,
    email: "test@zitadel.com",
    isEmailVerified: true,
    initialPassword: "Password1!",
});
Copy
import pulumi
import pulumiverse_zitadel as zitadel

default = zitadel.HumanUser("default",
    org_id=default_zitadel_org["id"],
    user_name="humanfull@localhost.com",
    first_name="firstname",
    last_name="lastname",
    nick_name="nickname",
    display_name="displayname",
    preferred_language="de",
    gender="GENDER_MALE",
    phone="+41799999999",
    is_phone_verified=True,
    email="test@zitadel.com",
    is_email_verified=True,
    initial_password="Password1!")
Copy
resources:
  default:
    type: zitadel:HumanUser
    properties:
      orgId: ${defaultZitadelOrg.id}
      userName: humanfull@localhost.com
      firstName: firstname
      lastName: lastname
      nickName: nickname
      displayName: displayname
      preferredLanguage: de
      gender: GENDER_MALE
      phone: '+41799999999'
      isPhoneVerified: true
      email: test@zitadel.com
      isEmailVerified: true
      initialPassword: Password1!
Copy

Create HumanUser Resource

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

Constructor syntax

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

@overload
def HumanUser(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              last_name: Optional[str] = None,
              email: Optional[str] = None,
              first_name: Optional[str] = None,
              user_name: Optional[str] = None,
              is_phone_verified: Optional[bool] = None,
              is_email_verified: Optional[bool] = None,
              display_name: Optional[str] = None,
              initial_password: Optional[str] = None,
              nick_name: Optional[str] = None,
              org_id: Optional[str] = None,
              phone: Optional[str] = None,
              preferred_language: Optional[str] = None,
              gender: Optional[str] = None)
func NewHumanUser(ctx *Context, name string, args HumanUserArgs, opts ...ResourceOption) (*HumanUser, error)
public HumanUser(string name, HumanUserArgs args, CustomResourceOptions? opts = null)
public HumanUser(String name, HumanUserArgs args)
public HumanUser(String name, HumanUserArgs args, CustomResourceOptions options)
type: zitadel:HumanUser
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. HumanUserArgs
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. HumanUserArgs
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. HumanUserArgs
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. HumanUserArgs
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. HumanUserArgs
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 humanUserResource = new Zitadel.HumanUser("humanUserResource", new()
{
    LastName = "string",
    Email = "string",
    FirstName = "string",
    UserName = "string",
    IsPhoneVerified = false,
    IsEmailVerified = false,
    DisplayName = "string",
    InitialPassword = "string",
    NickName = "string",
    OrgId = "string",
    Phone = "string",
    PreferredLanguage = "string",
    Gender = "string",
});
Copy
example, err := zitadel.NewHumanUser(ctx, "humanUserResource", &zitadel.HumanUserArgs{
	LastName:          pulumi.String("string"),
	Email:             pulumi.String("string"),
	FirstName:         pulumi.String("string"),
	UserName:          pulumi.String("string"),
	IsPhoneVerified:   pulumi.Bool(false),
	IsEmailVerified:   pulumi.Bool(false),
	DisplayName:       pulumi.String("string"),
	InitialPassword:   pulumi.String("string"),
	NickName:          pulumi.String("string"),
	OrgId:             pulumi.String("string"),
	Phone:             pulumi.String("string"),
	PreferredLanguage: pulumi.String("string"),
	Gender:            pulumi.String("string"),
})
Copy
var humanUserResource = new HumanUser("humanUserResource", HumanUserArgs.builder()
    .lastName("string")
    .email("string")
    .firstName("string")
    .userName("string")
    .isPhoneVerified(false)
    .isEmailVerified(false)
    .displayName("string")
    .initialPassword("string")
    .nickName("string")
    .orgId("string")
    .phone("string")
    .preferredLanguage("string")
    .gender("string")
    .build());
Copy
human_user_resource = zitadel.HumanUser("humanUserResource",
    last_name="string",
    email="string",
    first_name="string",
    user_name="string",
    is_phone_verified=False,
    is_email_verified=False,
    display_name="string",
    initial_password="string",
    nick_name="string",
    org_id="string",
    phone="string",
    preferred_language="string",
    gender="string")
Copy
const humanUserResource = new zitadel.HumanUser("humanUserResource", {
    lastName: "string",
    email: "string",
    firstName: "string",
    userName: "string",
    isPhoneVerified: false,
    isEmailVerified: false,
    displayName: "string",
    initialPassword: "string",
    nickName: "string",
    orgId: "string",
    phone: "string",
    preferredLanguage: "string",
    gender: "string",
});
Copy
type: zitadel:HumanUser
properties:
    displayName: string
    email: string
    firstName: string
    gender: string
    initialPassword: string
    isEmailVerified: false
    isPhoneVerified: false
    lastName: string
    nickName: string
    orgId: string
    phone: string
    preferredLanguage: string
    userName: string
Copy

HumanUser 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 HumanUser resource accepts the following input properties:

Email This property is required. string
Email of the user
FirstName This property is required. string
First name of the user
LastName This property is required. string
Last name of the user
UserName This property is required. string
Username
DisplayName string
Display name of the user
Gender string
Gender of the user, supported values: GENDERUNSPECIFIED, GENDERFEMALE, GENDERMALE, GENDERDIVERSE
InitialPassword Changes to this property will trigger replacement. string
Initially set password for the user, not changeable after creation
IsEmailVerified bool
Is the email verified of the user, can only be true if password of the user is set
IsPhoneVerified bool
Is the phone verified of the user
NickName string
Nick name of the user
OrgId Changes to this property will trigger replacement. string
ID of the organization
Phone string
Phone of the user
PreferredLanguage string
Preferred language of the user
Email This property is required. string
Email of the user
FirstName This property is required. string
First name of the user
LastName This property is required. string
Last name of the user
UserName This property is required. string
Username
DisplayName string
Display name of the user
Gender string
Gender of the user, supported values: GENDERUNSPECIFIED, GENDERFEMALE, GENDERMALE, GENDERDIVERSE
InitialPassword Changes to this property will trigger replacement. string
Initially set password for the user, not changeable after creation
IsEmailVerified bool
Is the email verified of the user, can only be true if password of the user is set
IsPhoneVerified bool
Is the phone verified of the user
NickName string
Nick name of the user
OrgId Changes to this property will trigger replacement. string
ID of the organization
Phone string
Phone of the user
PreferredLanguage string
Preferred language of the user
email This property is required. String
Email of the user
firstName This property is required. String
First name of the user
lastName This property is required. String
Last name of the user
userName This property is required. String
Username
displayName String
Display name of the user
gender String
Gender of the user, supported values: GENDERUNSPECIFIED, GENDERFEMALE, GENDERMALE, GENDERDIVERSE
initialPassword Changes to this property will trigger replacement. String
Initially set password for the user, not changeable after creation
isEmailVerified Boolean
Is the email verified of the user, can only be true if password of the user is set
isPhoneVerified Boolean
Is the phone verified of the user
nickName String
Nick name of the user
orgId Changes to this property will trigger replacement. String
ID of the organization
phone String
Phone of the user
preferredLanguage String
Preferred language of the user
email This property is required. string
Email of the user
firstName This property is required. string
First name of the user
lastName This property is required. string
Last name of the user
userName This property is required. string
Username
displayName string
Display name of the user
gender string
Gender of the user, supported values: GENDERUNSPECIFIED, GENDERFEMALE, GENDERMALE, GENDERDIVERSE
initialPassword Changes to this property will trigger replacement. string
Initially set password for the user, not changeable after creation
isEmailVerified boolean
Is the email verified of the user, can only be true if password of the user is set
isPhoneVerified boolean
Is the phone verified of the user
nickName string
Nick name of the user
orgId Changes to this property will trigger replacement. string
ID of the organization
phone string
Phone of the user
preferredLanguage string
Preferred language of the user
email This property is required. str
Email of the user
first_name This property is required. str
First name of the user
last_name This property is required. str
Last name of the user
user_name This property is required. str
Username
display_name str
Display name of the user
gender str
Gender of the user, supported values: GENDERUNSPECIFIED, GENDERFEMALE, GENDERMALE, GENDERDIVERSE
initial_password Changes to this property will trigger replacement. str
Initially set password for the user, not changeable after creation
is_email_verified bool
Is the email verified of the user, can only be true if password of the user is set
is_phone_verified bool
Is the phone verified of the user
nick_name str
Nick name of the user
org_id Changes to this property will trigger replacement. str
ID of the organization
phone str
Phone of the user
preferred_language str
Preferred language of the user
email This property is required. String
Email of the user
firstName This property is required. String
First name of the user
lastName This property is required. String
Last name of the user
userName This property is required. String
Username
displayName String
Display name of the user
gender String
Gender of the user, supported values: GENDERUNSPECIFIED, GENDERFEMALE, GENDERMALE, GENDERDIVERSE
initialPassword Changes to this property will trigger replacement. String
Initially set password for the user, not changeable after creation
isEmailVerified Boolean
Is the email verified of the user, can only be true if password of the user is set
isPhoneVerified Boolean
Is the phone verified of the user
nickName String
Nick name of the user
orgId Changes to this property will trigger replacement. String
ID of the organization
phone String
Phone of the user
preferredLanguage String
Preferred language of the user

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
LoginNames List<string>
Loginnames
PreferredLoginName string
Preferred login name
State string
State of the user
Id string
The provider-assigned unique ID for this managed resource.
LoginNames []string
Loginnames
PreferredLoginName string
Preferred login name
State string
State of the user
id String
The provider-assigned unique ID for this managed resource.
loginNames List<String>
Loginnames
preferredLoginName String
Preferred login name
state String
State of the user
id string
The provider-assigned unique ID for this managed resource.
loginNames string[]
Loginnames
preferredLoginName string
Preferred login name
state string
State of the user
id str
The provider-assigned unique ID for this managed resource.
login_names Sequence[str]
Loginnames
preferred_login_name str
Preferred login name
state str
State of the user
id String
The provider-assigned unique ID for this managed resource.
loginNames List<String>
Loginnames
preferredLoginName String
Preferred login name
state String
State of the user

Look up Existing HumanUser Resource

Get an existing HumanUser 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?: HumanUserState, opts?: CustomResourceOptions): HumanUser
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        display_name: Optional[str] = None,
        email: Optional[str] = None,
        first_name: Optional[str] = None,
        gender: Optional[str] = None,
        initial_password: Optional[str] = None,
        is_email_verified: Optional[bool] = None,
        is_phone_verified: Optional[bool] = None,
        last_name: Optional[str] = None,
        login_names: Optional[Sequence[str]] = None,
        nick_name: Optional[str] = None,
        org_id: Optional[str] = None,
        phone: Optional[str] = None,
        preferred_language: Optional[str] = None,
        preferred_login_name: Optional[str] = None,
        state: Optional[str] = None,
        user_name: Optional[str] = None) -> HumanUser
func GetHumanUser(ctx *Context, name string, id IDInput, state *HumanUserState, opts ...ResourceOption) (*HumanUser, error)
public static HumanUser Get(string name, Input<string> id, HumanUserState? state, CustomResourceOptions? opts = null)
public static HumanUser get(String name, Output<String> id, HumanUserState state, CustomResourceOptions options)
resources:  _:    type: zitadel:HumanUser    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:
DisplayName string
Display name of the user
Email string
Email of the user
FirstName string
First name of the user
Gender string
Gender of the user, supported values: GENDERUNSPECIFIED, GENDERFEMALE, GENDERMALE, GENDERDIVERSE
InitialPassword Changes to this property will trigger replacement. string
Initially set password for the user, not changeable after creation
IsEmailVerified bool
Is the email verified of the user, can only be true if password of the user is set
IsPhoneVerified bool
Is the phone verified of the user
LastName string
Last name of the user
LoginNames Changes to this property will trigger replacement. List<string>
Loginnames
NickName string
Nick name of the user
OrgId Changes to this property will trigger replacement. string
ID of the organization
Phone string
Phone of the user
PreferredLanguage string
Preferred language of the user
PreferredLoginName Changes to this property will trigger replacement. string
Preferred login name
State string
State of the user
UserName string
Username
DisplayName string
Display name of the user
Email string
Email of the user
FirstName string
First name of the user
Gender string
Gender of the user, supported values: GENDERUNSPECIFIED, GENDERFEMALE, GENDERMALE, GENDERDIVERSE
InitialPassword Changes to this property will trigger replacement. string
Initially set password for the user, not changeable after creation
IsEmailVerified bool
Is the email verified of the user, can only be true if password of the user is set
IsPhoneVerified bool
Is the phone verified of the user
LastName string
Last name of the user
LoginNames Changes to this property will trigger replacement. []string
Loginnames
NickName string
Nick name of the user
OrgId Changes to this property will trigger replacement. string
ID of the organization
Phone string
Phone of the user
PreferredLanguage string
Preferred language of the user
PreferredLoginName Changes to this property will trigger replacement. string
Preferred login name
State string
State of the user
UserName string
Username
displayName String
Display name of the user
email String
Email of the user
firstName String
First name of the user
gender String
Gender of the user, supported values: GENDERUNSPECIFIED, GENDERFEMALE, GENDERMALE, GENDERDIVERSE
initialPassword Changes to this property will trigger replacement. String
Initially set password for the user, not changeable after creation
isEmailVerified Boolean
Is the email verified of the user, can only be true if password of the user is set
isPhoneVerified Boolean
Is the phone verified of the user
lastName String
Last name of the user
loginNames Changes to this property will trigger replacement. List<String>
Loginnames
nickName String
Nick name of the user
orgId Changes to this property will trigger replacement. String
ID of the organization
phone String
Phone of the user
preferredLanguage String
Preferred language of the user
preferredLoginName Changes to this property will trigger replacement. String
Preferred login name
state String
State of the user
userName String
Username
displayName string
Display name of the user
email string
Email of the user
firstName string
First name of the user
gender string
Gender of the user, supported values: GENDERUNSPECIFIED, GENDERFEMALE, GENDERMALE, GENDERDIVERSE
initialPassword Changes to this property will trigger replacement. string
Initially set password for the user, not changeable after creation
isEmailVerified boolean
Is the email verified of the user, can only be true if password of the user is set
isPhoneVerified boolean
Is the phone verified of the user
lastName string
Last name of the user
loginNames Changes to this property will trigger replacement. string[]
Loginnames
nickName string
Nick name of the user
orgId Changes to this property will trigger replacement. string
ID of the organization
phone string
Phone of the user
preferredLanguage string
Preferred language of the user
preferredLoginName Changes to this property will trigger replacement. string
Preferred login name
state string
State of the user
userName string
Username
display_name str
Display name of the user
email str
Email of the user
first_name str
First name of the user
gender str
Gender of the user, supported values: GENDERUNSPECIFIED, GENDERFEMALE, GENDERMALE, GENDERDIVERSE
initial_password Changes to this property will trigger replacement. str
Initially set password for the user, not changeable after creation
is_email_verified bool
Is the email verified of the user, can only be true if password of the user is set
is_phone_verified bool
Is the phone verified of the user
last_name str
Last name of the user
login_names Changes to this property will trigger replacement. Sequence[str]
Loginnames
nick_name str
Nick name of the user
org_id Changes to this property will trigger replacement. str
ID of the organization
phone str
Phone of the user
preferred_language str
Preferred language of the user
preferred_login_name Changes to this property will trigger replacement. str
Preferred login name
state str
State of the user
user_name str
Username
displayName String
Display name of the user
email String
Email of the user
firstName String
First name of the user
gender String
Gender of the user, supported values: GENDERUNSPECIFIED, GENDERFEMALE, GENDERMALE, GENDERDIVERSE
initialPassword Changes to this property will trigger replacement. String
Initially set password for the user, not changeable after creation
isEmailVerified Boolean
Is the email verified of the user, can only be true if password of the user is set
isPhoneVerified Boolean
Is the phone verified of the user
lastName String
Last name of the user
loginNames Changes to this property will trigger replacement. List<String>
Loginnames
nickName String
Nick name of the user
orgId Changes to this property will trigger replacement. String
ID of the organization
phone String
Phone of the user
preferredLanguage String
Preferred language of the user
preferredLoginName Changes to this property will trigger replacement. String
Preferred login name
state String
State of the user
userName String
Username

Import

bash The resource can be imported using the ID format id[:org_id][:initial_password]>, e.g.

 $ pulumi import zitadel:index/humanUser:HumanUser imported '123456789012345678:123456789012345678:Password1!'
Copy

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

Package Details

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