1. Packages
  2. Octopusdeploy Provider
  3. API Docs
  4. User
octopusdeploy 0.43.1 published on Wednesday, Apr 30, 2025 by octopusdeploylabs

octopusdeploy.User

Explore with Pulumi AI

octopusdeploy logo
octopusdeploy 0.43.1 published on Wednesday, Apr 30, 2025 by octopusdeploylabs

    This resource manages users in Octopus Deploy.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as octopusdeploy from "@pulumi/octopusdeploy";
    
    const example = new octopusdeploy.User("example", {
        displayName: "Bob Smith",
        emailAddress: "bob.smith@example.com",
        identities: [{
            claims: [
                {
                    isIdentifyingClaim: true,
                    name: "email",
                    value: "bob.smith@example.com",
                },
                {
                    isIdentifyingClaim: false,
                    name: "dn",
                    value: "Bob Smith",
                },
            ],
            provider: "Octopus ID",
        }],
        isActive: true,
        isService: false,
        password: "###########",
        username: "[username]",
    });
    
    import pulumi
    import pulumi_octopusdeploy as octopusdeploy
    
    example = octopusdeploy.User("example",
        display_name="Bob Smith",
        email_address="bob.smith@example.com",
        identities=[{
            "claims": [
                {
                    "is_identifying_claim": True,
                    "name": "email",
                    "value": "bob.smith@example.com",
                },
                {
                    "is_identifying_claim": False,
                    "name": "dn",
                    "value": "Bob Smith",
                },
            ],
            "provider": "Octopus ID",
        }],
        is_active=True,
        is_service=False,
        password="###########",
        username="[username]")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/octopusdeploy/octopusdeploy"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := octopusdeploy.NewUser(ctx, "example", &octopusdeploy.UserArgs{
    			DisplayName:  pulumi.String("Bob Smith"),
    			EmailAddress: pulumi.String("bob.smith@example.com"),
    			Identities: octopusdeploy.UserIdentityArray{
    				&octopusdeploy.UserIdentityArgs{
    					Claims: octopusdeploy.UserIdentityClaimArray{
    						&octopusdeploy.UserIdentityClaimArgs{
    							IsIdentifyingClaim: pulumi.Bool(true),
    							Name:               pulumi.String("email"),
    							Value:              pulumi.String("bob.smith@example.com"),
    						},
    						&octopusdeploy.UserIdentityClaimArgs{
    							IsIdentifyingClaim: pulumi.Bool(false),
    							Name:               pulumi.String("dn"),
    							Value:              pulumi.String("Bob Smith"),
    						},
    					},
    					Provider: pulumi.String("Octopus ID"),
    				},
    			},
    			IsActive:  pulumi.Bool(true),
    			IsService: pulumi.Bool(false),
    			Password:  pulumi.String("###########"),
    			Username:  pulumi.String("[username]"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Octopusdeploy = Pulumi.Octopusdeploy;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Octopusdeploy.User("example", new()
        {
            DisplayName = "Bob Smith",
            EmailAddress = "bob.smith@example.com",
            Identities = new[]
            {
                new Octopusdeploy.Inputs.UserIdentityArgs
                {
                    Claims = new[]
                    {
                        new Octopusdeploy.Inputs.UserIdentityClaimArgs
                        {
                            IsIdentifyingClaim = true,
                            Name = "email",
                            Value = "bob.smith@example.com",
                        },
                        new Octopusdeploy.Inputs.UserIdentityClaimArgs
                        {
                            IsIdentifyingClaim = false,
                            Name = "dn",
                            Value = "Bob Smith",
                        },
                    },
                    Provider = "Octopus ID",
                },
            },
            IsActive = true,
            IsService = false,
            Password = "###########",
            Username = "[username]",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.octopusdeploy.User;
    import com.pulumi.octopusdeploy.UserArgs;
    import com.pulumi.octopusdeploy.inputs.UserIdentityArgs;
    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()
                .displayName("Bob Smith")
                .emailAddress("bob.smith@example.com")
                .identities(UserIdentityArgs.builder()
                    .claims(                
                        UserIdentityClaimArgs.builder()
                            .isIdentifyingClaim(true)
                            .name("email")
                            .value("bob.smith@example.com")
                            .build(),
                        UserIdentityClaimArgs.builder()
                            .isIdentifyingClaim(false)
                            .name("dn")
                            .value("Bob Smith")
                            .build())
                    .provider("Octopus ID")
                    .build())
                .isActive(true)
                .isService(false)
                .password("###########")
                .username("[username]")
                .build());
    
        }
    }
    
    resources:
      example:
        type: octopusdeploy:User
        properties:
          displayName: Bob Smith
          emailAddress: bob.smith@example.com
          identities:
            - claims:
                - isIdentifyingClaim: true
                  name: email
                  value: bob.smith@example.com
                - isIdentifyingClaim: false
                  name: dn
                  value: Bob Smith
              provider: Octopus ID
          isActive: true
          isService: false
          password: '###########'
          # get from secure environment/store
          username: '[username]'
    

    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,
             display_name: Optional[str] = None,
             username: Optional[str] = None,
             email_address: Optional[str] = None,
             identities: Optional[Sequence[UserIdentityArgs]] = None,
             is_active: Optional[bool] = None,
             is_service: Optional[bool] = None,
             password: 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: octopusdeploy:User
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args UserArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args 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 string
    The unique name of the resource.
    args UserArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args UserArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args 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 Octopusdeploy.User("userResource", new()
    {
        DisplayName = "string",
        Username = "string",
        EmailAddress = "string",
        Identities = new[]
        {
            new Octopusdeploy.Inputs.UserIdentityArgs
            {
                Claims = new[]
                {
                    new Octopusdeploy.Inputs.UserIdentityClaimArgs
                    {
                        IsIdentifyingClaim = false,
                        Name = "string",
                        Value = "string",
                    },
                },
                Provider = "string",
            },
        },
        IsActive = false,
        IsService = false,
        Password = "string",
    });
    
    example, err := octopusdeploy.NewUser(ctx, "userResource", &octopusdeploy.UserArgs{
    	DisplayName:  pulumi.String("string"),
    	Username:     pulumi.String("string"),
    	EmailAddress: pulumi.String("string"),
    	Identities: octopusdeploy.UserIdentityArray{
    		&octopusdeploy.UserIdentityArgs{
    			Claims: octopusdeploy.UserIdentityClaimArray{
    				&octopusdeploy.UserIdentityClaimArgs{
    					IsIdentifyingClaim: pulumi.Bool(false),
    					Name:               pulumi.String("string"),
    					Value:              pulumi.String("string"),
    				},
    			},
    			Provider: pulumi.String("string"),
    		},
    	},
    	IsActive:  pulumi.Bool(false),
    	IsService: pulumi.Bool(false),
    	Password:  pulumi.String("string"),
    })
    
    var userResource = new User("userResource", UserArgs.builder()
        .displayName("string")
        .username("string")
        .emailAddress("string")
        .identities(UserIdentityArgs.builder()
            .claims(UserIdentityClaimArgs.builder()
                .isIdentifyingClaim(false)
                .name("string")
                .value("string")
                .build())
            .provider("string")
            .build())
        .isActive(false)
        .isService(false)
        .password("string")
        .build());
    
    user_resource = octopusdeploy.User("userResource",
        display_name="string",
        username="string",
        email_address="string",
        identities=[{
            "claims": [{
                "is_identifying_claim": False,
                "name": "string",
                "value": "string",
            }],
            "provider": "string",
        }],
        is_active=False,
        is_service=False,
        password="string")
    
    const userResource = new octopusdeploy.User("userResource", {
        displayName: "string",
        username: "string",
        emailAddress: "string",
        identities: [{
            claims: [{
                isIdentifyingClaim: false,
                name: "string",
                value: "string",
            }],
            provider: "string",
        }],
        isActive: false,
        isService: false,
        password: "string",
    });
    
    type: octopusdeploy:User
    properties:
        displayName: string
        emailAddress: string
        identities:
            - claims:
                - isIdentifyingClaim: false
                  name: string
                  value: string
              provider: string
        isActive: false
        isService: false
        password: string
        username: string
    

    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:

    DisplayName string
    The display name of this resource.
    Username string
    The username associated with this resource.
    EmailAddress string
    The email address of this resource.
    Identities List<UserIdentity>
    The identities associated with the user.
    IsActive bool
    Specifies whether or not the user is active.
    IsService bool
    Specifies whether or not the user is a service account.
    Password string
    The password associated with this resource.
    DisplayName string
    The display name of this resource.
    Username string
    The username associated with this resource.
    EmailAddress string
    The email address of this resource.
    Identities []UserIdentityArgs
    The identities associated with the user.
    IsActive bool
    Specifies whether or not the user is active.
    IsService bool
    Specifies whether or not the user is a service account.
    Password string
    The password associated with this resource.
    displayName String
    The display name of this resource.
    username String
    The username associated with this resource.
    emailAddress String
    The email address of this resource.
    identities List<UserIdentity>
    The identities associated with the user.
    isActive Boolean
    Specifies whether or not the user is active.
    isService Boolean
    Specifies whether or not the user is a service account.
    password String
    The password associated with this resource.
    displayName string
    The display name of this resource.
    username string
    The username associated with this resource.
    emailAddress string
    The email address of this resource.
    identities UserIdentity[]
    The identities associated with the user.
    isActive boolean
    Specifies whether or not the user is active.
    isService boolean
    Specifies whether or not the user is a service account.
    password string
    The password associated with this resource.
    display_name str
    The display name of this resource.
    username str
    The username associated with this resource.
    email_address str
    The email address of this resource.
    identities Sequence[UserIdentityArgs]
    The identities associated with the user.
    is_active bool
    Specifies whether or not the user is active.
    is_service bool
    Specifies whether or not the user is a service account.
    password str
    The password associated with this resource.
    displayName String
    The display name of this resource.
    username String
    The username associated with this resource.
    emailAddress String
    The email address of this resource.
    identities List<Property Map>
    The identities associated with the user.
    isActive Boolean
    Specifies whether or not the user is active.
    isService Boolean
    Specifies whether or not the user is a service account.
    password String
    The password associated with this resource.

    Outputs

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

    CanPasswordBeEdited bool
    Specifies whether or not the password can be edited.
    Id string
    The provider-assigned unique ID for this managed resource.
    IsRequestor bool
    Specifies whether or not the user is the requestor.
    CanPasswordBeEdited bool
    Specifies whether or not the password can be edited.
    Id string
    The provider-assigned unique ID for this managed resource.
    IsRequestor bool
    Specifies whether or not the user is the requestor.
    canPasswordBeEdited Boolean
    Specifies whether or not the password can be edited.
    id String
    The provider-assigned unique ID for this managed resource.
    isRequestor Boolean
    Specifies whether or not the user is the requestor.
    canPasswordBeEdited boolean
    Specifies whether or not the password can be edited.
    id string
    The provider-assigned unique ID for this managed resource.
    isRequestor boolean
    Specifies whether or not the user is the requestor.
    can_password_be_edited bool
    Specifies whether or not the password can be edited.
    id str
    The provider-assigned unique ID for this managed resource.
    is_requestor bool
    Specifies whether or not the user is the requestor.
    canPasswordBeEdited Boolean
    Specifies whether or not the password can be edited.
    id String
    The provider-assigned unique ID for this managed resource.
    isRequestor Boolean
    Specifies whether or not the user is the requestor.

    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_password_be_edited: Optional[bool] = None,
            display_name: Optional[str] = None,
            email_address: Optional[str] = None,
            identities: Optional[Sequence[UserIdentityArgs]] = None,
            is_active: Optional[bool] = None,
            is_requestor: Optional[bool] = None,
            is_service: Optional[bool] = None,
            password: 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: octopusdeploy:User    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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:
    CanPasswordBeEdited bool
    Specifies whether or not the password can be edited.
    DisplayName string
    The display name of this resource.
    EmailAddress string
    The email address of this resource.
    Identities List<UserIdentity>
    The identities associated with the user.
    IsActive bool
    Specifies whether or not the user is active.
    IsRequestor bool
    Specifies whether or not the user is the requestor.
    IsService bool
    Specifies whether or not the user is a service account.
    Password string
    The password associated with this resource.
    Username string
    The username associated with this resource.
    CanPasswordBeEdited bool
    Specifies whether or not the password can be edited.
    DisplayName string
    The display name of this resource.
    EmailAddress string
    The email address of this resource.
    Identities []UserIdentityArgs
    The identities associated with the user.
    IsActive bool
    Specifies whether or not the user is active.
    IsRequestor bool
    Specifies whether or not the user is the requestor.
    IsService bool
    Specifies whether or not the user is a service account.
    Password string
    The password associated with this resource.
    Username string
    The username associated with this resource.
    canPasswordBeEdited Boolean
    Specifies whether or not the password can be edited.
    displayName String
    The display name of this resource.
    emailAddress String
    The email address of this resource.
    identities List<UserIdentity>
    The identities associated with the user.
    isActive Boolean
    Specifies whether or not the user is active.
    isRequestor Boolean
    Specifies whether or not the user is the requestor.
    isService Boolean
    Specifies whether or not the user is a service account.
    password String
    The password associated with this resource.
    username String
    The username associated with this resource.
    canPasswordBeEdited boolean
    Specifies whether or not the password can be edited.
    displayName string
    The display name of this resource.
    emailAddress string
    The email address of this resource.
    identities UserIdentity[]
    The identities associated with the user.
    isActive boolean
    Specifies whether or not the user is active.
    isRequestor boolean
    Specifies whether or not the user is the requestor.
    isService boolean
    Specifies whether or not the user is a service account.
    password string
    The password associated with this resource.
    username string
    The username associated with this resource.
    can_password_be_edited bool
    Specifies whether or not the password can be edited.
    display_name str
    The display name of this resource.
    email_address str
    The email address of this resource.
    identities Sequence[UserIdentityArgs]
    The identities associated with the user.
    is_active bool
    Specifies whether or not the user is active.
    is_requestor bool
    Specifies whether or not the user is the requestor.
    is_service bool
    Specifies whether or not the user is a service account.
    password str
    The password associated with this resource.
    username str
    The username associated with this resource.
    canPasswordBeEdited Boolean
    Specifies whether or not the password can be edited.
    displayName String
    The display name of this resource.
    emailAddress String
    The email address of this resource.
    identities List<Property Map>
    The identities associated with the user.
    isActive Boolean
    Specifies whether or not the user is active.
    isRequestor Boolean
    Specifies whether or not the user is the requestor.
    isService Boolean
    Specifies whether or not the user is a service account.
    password String
    The password associated with this resource.
    username String
    The username associated with this resource.

    Supporting Types

    UserIdentity, UserIdentityArgs

    Claims List<UserIdentityClaim>
    The claim associated with the identity.
    Provider string
    The identity provider.
    Claims []UserIdentityClaim
    The claim associated with the identity.
    Provider string
    The identity provider.
    claims List<UserIdentityClaim>
    The claim associated with the identity.
    provider String
    The identity provider.
    claims UserIdentityClaim[]
    The claim associated with the identity.
    provider string
    The identity provider.
    claims Sequence[UserIdentityClaim]
    The claim associated with the identity.
    provider str
    The identity provider.
    claims List<Property Map>
    The claim associated with the identity.
    provider String
    The identity provider.

    UserIdentityClaim, UserIdentityClaimArgs

    IsIdentifyingClaim bool
    Specifies whether or not the claim is an identifying claim.
    Name string
    The name of this resource.
    Value string
    The value of this resource.
    IsIdentifyingClaim bool
    Specifies whether or not the claim is an identifying claim.
    Name string
    The name of this resource.
    Value string
    The value of this resource.
    isIdentifyingClaim Boolean
    Specifies whether or not the claim is an identifying claim.
    name String
    The name of this resource.
    value String
    The value of this resource.
    isIdentifyingClaim boolean
    Specifies whether or not the claim is an identifying claim.
    name string
    The name of this resource.
    value string
    The value of this resource.
    is_identifying_claim bool
    Specifies whether or not the claim is an identifying claim.
    name str
    The name of this resource.
    value str
    The value of this resource.
    isIdentifyingClaim Boolean
    Specifies whether or not the claim is an identifying claim.
    name String
    The name of this resource.
    value String
    The value of this resource.

    Import

    $ pulumi import octopusdeploy:index/user:User [options] octopusdeploy_user.<name> <user-id>
    

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

    Package Details

    Repository
    octopusdeploy octopusdeploylabs/terraform-provider-octopusdeploy
    License
    Notes
    This Pulumi package is based on the octopusdeploy Terraform Provider.
    octopusdeploy logo
    octopusdeploy 0.43.1 published on Wednesday, Apr 30, 2025 by octopusdeploylabs