1. Packages
  2. Twingate
  3. API Docs
  4. TwingateUser
Twingate v3.0.17 published on Wednesday, Apr 9, 2025 by Twingate

twingate.TwingateUser

Explore with Pulumi AI

Users provides different levels of write capabilities across the Twingate Admin Console. For more information, see Twingate’s documentation.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as twingate from "@twingate/pulumi-twingate";

const user = new twingate.TwingateUser("user", {
    email: "sample@company.com",
    firstName: "Twin",
    lastName: "Gate",
    role: "DEVOPS",
    sendInvite: true,
});
Copy
import pulumi
import pulumi_twingate as twingate

user = twingate.TwingateUser("user",
    email="sample@company.com",
    first_name="Twin",
    last_name="Gate",
    role="DEVOPS",
    send_invite=True)
Copy
package main

import (
	"github.com/Twingate/pulumi-twingate/sdk/v3/go/twingate"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := twingate.NewTwingateUser(ctx, "user", &twingate.TwingateUserArgs{
			Email:      pulumi.String("sample@company.com"),
			FirstName:  pulumi.String("Twin"),
			LastName:   pulumi.String("Gate"),
			Role:       pulumi.String("DEVOPS"),
			SendInvite: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Twingate = Twingate.Twingate;

return await Deployment.RunAsync(() => 
{
    var user = new Twingate.TwingateUser("user", new()
    {
        Email = "sample@company.com",
        FirstName = "Twin",
        LastName = "Gate",
        Role = "DEVOPS",
        SendInvite = true,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.twingate.TwingateUser;
import com.pulumi.twingate.TwingateUserArgs;
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 user = new TwingateUser("user", TwingateUserArgs.builder()
            .email("sample@company.com")
            .firstName("Twin")
            .lastName("Gate")
            .role("DEVOPS")
            .sendInvite(true)
            .build());

    }
}
Copy
resources:
  user:
    type: twingate:TwingateUser
    properties:
      email: sample@company.com
      firstName: Twin
      lastName: Gate
      role: DEVOPS
      sendInvite: true
Copy

Create TwingateUser Resource

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

Constructor syntax

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

@overload
def TwingateUser(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 email: Optional[str] = None,
                 first_name: Optional[str] = None,
                 is_active: Optional[bool] = None,
                 last_name: Optional[str] = None,
                 role: Optional[str] = None,
                 send_invite: Optional[bool] = None)
func NewTwingateUser(ctx *Context, name string, args TwingateUserArgs, opts ...ResourceOption) (*TwingateUser, error)
public TwingateUser(string name, TwingateUserArgs args, CustomResourceOptions? opts = null)
public TwingateUser(String name, TwingateUserArgs args)
public TwingateUser(String name, TwingateUserArgs args, CustomResourceOptions options)
type: twingate:TwingateUser
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. TwingateUserArgs
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. TwingateUserArgs
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. TwingateUserArgs
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. TwingateUserArgs
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. TwingateUserArgs
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 twingateUserResource = new Twingate.TwingateUser("twingateUserResource", new()
{
    Email = "string",
    FirstName = "string",
    IsActive = false,
    LastName = "string",
    Role = "string",
    SendInvite = false,
});
Copy
example, err := twingate.NewTwingateUser(ctx, "twingateUserResource", &twingate.TwingateUserArgs{
	Email:      pulumi.String("string"),
	FirstName:  pulumi.String("string"),
	IsActive:   pulumi.Bool(false),
	LastName:   pulumi.String("string"),
	Role:       pulumi.String("string"),
	SendInvite: pulumi.Bool(false),
})
Copy
var twingateUserResource = new TwingateUser("twingateUserResource", TwingateUserArgs.builder()
    .email("string")
    .firstName("string")
    .isActive(false)
    .lastName("string")
    .role("string")
    .sendInvite(false)
    .build());
Copy
twingate_user_resource = twingate.TwingateUser("twingateUserResource",
    email="string",
    first_name="string",
    is_active=False,
    last_name="string",
    role="string",
    send_invite=False)
Copy
const twingateUserResource = new twingate.TwingateUser("twingateUserResource", {
    email: "string",
    firstName: "string",
    isActive: false,
    lastName: "string",
    role: "string",
    sendInvite: false,
});
Copy
type: twingate:TwingateUser
properties:
    email: string
    firstName: string
    isActive: false
    lastName: string
    role: string
    sendInvite: false
Copy

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

Email This property is required. string
The User's email address
FirstName string
The User's first name
IsActive bool
Determines whether the User is active or not. Inactive users will be not able to sign in.
LastName string
The User's last name
Role string
Determines the User's role. Either ADMIN, DEVOPS, SUPPORT or MEMBER.
SendInvite bool
Determines whether to send an email invitation to the User. True by default.
Email This property is required. string
The User's email address
FirstName string
The User's first name
IsActive bool
Determines whether the User is active or not. Inactive users will be not able to sign in.
LastName string
The User's last name
Role string
Determines the User's role. Either ADMIN, DEVOPS, SUPPORT or MEMBER.
SendInvite bool
Determines whether to send an email invitation to the User. True by default.
email This property is required. String
The User's email address
firstName String
The User's first name
isActive Boolean
Determines whether the User is active or not. Inactive users will be not able to sign in.
lastName String
The User's last name
role String
Determines the User's role. Either ADMIN, DEVOPS, SUPPORT or MEMBER.
sendInvite Boolean
Determines whether to send an email invitation to the User. True by default.
email This property is required. string
The User's email address
firstName string
The User's first name
isActive boolean
Determines whether the User is active or not. Inactive users will be not able to sign in.
lastName string
The User's last name
role string
Determines the User's role. Either ADMIN, DEVOPS, SUPPORT or MEMBER.
sendInvite boolean
Determines whether to send an email invitation to the User. True by default.
email This property is required. str
The User's email address
first_name str
The User's first name
is_active bool
Determines whether the User is active or not. Inactive users will be not able to sign in.
last_name str
The User's last name
role str
Determines the User's role. Either ADMIN, DEVOPS, SUPPORT or MEMBER.
send_invite bool
Determines whether to send an email invitation to the User. True by default.
email This property is required. String
The User's email address
firstName String
The User's first name
isActive Boolean
Determines whether the User is active or not. Inactive users will be not able to sign in.
lastName String
The User's last name
role String
Determines the User's role. Either ADMIN, DEVOPS, SUPPORT or MEMBER.
sendInvite Boolean
Determines whether to send an email invitation to the User. True by default.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Type string
Indicates the User's type. Either MANUAL or SYNCED.
Id string
The provider-assigned unique ID for this managed resource.
Type string
Indicates the User's type. Either MANUAL or SYNCED.
id String
The provider-assigned unique ID for this managed resource.
type String
Indicates the User's type. Either MANUAL or SYNCED.
id string
The provider-assigned unique ID for this managed resource.
type string
Indicates the User's type. Either MANUAL or SYNCED.
id str
The provider-assigned unique ID for this managed resource.
type str
Indicates the User's type. Either MANUAL or SYNCED.
id String
The provider-assigned unique ID for this managed resource.
type String
Indicates the User's type. Either MANUAL or SYNCED.

Look up Existing TwingateUser Resource

Get an existing TwingateUser 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?: TwingateUserState, opts?: CustomResourceOptions): TwingateUser
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        email: Optional[str] = None,
        first_name: Optional[str] = None,
        is_active: Optional[bool] = None,
        last_name: Optional[str] = None,
        role: Optional[str] = None,
        send_invite: Optional[bool] = None,
        type: Optional[str] = None) -> TwingateUser
func GetTwingateUser(ctx *Context, name string, id IDInput, state *TwingateUserState, opts ...ResourceOption) (*TwingateUser, error)
public static TwingateUser Get(string name, Input<string> id, TwingateUserState? state, CustomResourceOptions? opts = null)
public static TwingateUser get(String name, Output<String> id, TwingateUserState state, CustomResourceOptions options)
resources:  _:    type: twingate:TwingateUser    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:
Email string
The User's email address
FirstName string
The User's first name
IsActive bool
Determines whether the User is active or not. Inactive users will be not able to sign in.
LastName string
The User's last name
Role string
Determines the User's role. Either ADMIN, DEVOPS, SUPPORT or MEMBER.
SendInvite bool
Determines whether to send an email invitation to the User. True by default.
Type string
Indicates the User's type. Either MANUAL or SYNCED.
Email string
The User's email address
FirstName string
The User's first name
IsActive bool
Determines whether the User is active or not. Inactive users will be not able to sign in.
LastName string
The User's last name
Role string
Determines the User's role. Either ADMIN, DEVOPS, SUPPORT or MEMBER.
SendInvite bool
Determines whether to send an email invitation to the User. True by default.
Type string
Indicates the User's type. Either MANUAL or SYNCED.
email String
The User's email address
firstName String
The User's first name
isActive Boolean
Determines whether the User is active or not. Inactive users will be not able to sign in.
lastName String
The User's last name
role String
Determines the User's role. Either ADMIN, DEVOPS, SUPPORT or MEMBER.
sendInvite Boolean
Determines whether to send an email invitation to the User. True by default.
type String
Indicates the User's type. Either MANUAL or SYNCED.
email string
The User's email address
firstName string
The User's first name
isActive boolean
Determines whether the User is active or not. Inactive users will be not able to sign in.
lastName string
The User's last name
role string
Determines the User's role. Either ADMIN, DEVOPS, SUPPORT or MEMBER.
sendInvite boolean
Determines whether to send an email invitation to the User. True by default.
type string
Indicates the User's type. Either MANUAL or SYNCED.
email str
The User's email address
first_name str
The User's first name
is_active bool
Determines whether the User is active or not. Inactive users will be not able to sign in.
last_name str
The User's last name
role str
Determines the User's role. Either ADMIN, DEVOPS, SUPPORT or MEMBER.
send_invite bool
Determines whether to send an email invitation to the User. True by default.
type str
Indicates the User's type. Either MANUAL or SYNCED.
email String
The User's email address
firstName String
The User's first name
isActive Boolean
Determines whether the User is active or not. Inactive users will be not able to sign in.
lastName String
The User's last name
role String
Determines the User's role. Either ADMIN, DEVOPS, SUPPORT or MEMBER.
sendInvite Boolean
Determines whether to send an email invitation to the User. True by default.
type String
Indicates the User's type. Either MANUAL or SYNCED.

Package Details

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