1. Packages
  2. Artifactory
  3. API Docs
  4. UnmanagedUser
artifactory v6.8.4 published on Thursday, Jun 6, 2024 by Pulumi

artifactory.UnmanagedUser

Explore with Pulumi AI

artifactory logo
artifactory v6.8.4 published on Thursday, Jun 6, 2024 by Pulumi

    Provides an Artifactory unmanaged user resource. This can be used to create and manage Artifactory users. The password is a required field by the Artifactory API, but we made it optional in this resource to accommodate the scenario where the password is not needed and will be reset by the actual user later. When the optional attribute password is omitted, a random password is generated according to current Artifactory password policy.

    The generated password won’t be stored in the TF state and can not be recovered. The user must reset the password to be able to log in. An admin can always generate the access key for the user as well. The password change won’t trigger state drift.

    This resource is an alias for artifactory.User resource, it is identical and was added for clarity and compatibility purposes. We don’t recommend to use this resource unless there is a specific use case for it. Recommended resource is artifactory.ManagedUser.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as artifactory from "@pulumi/artifactory";
    
    // Create a new Artifactory user called terraform
    const test_user = new artifactory.UnmanagedUser("test-user", {
        name: "terraform",
        email: "test-user@artifactory-terraform.com",
        groups: ["logged-in-users"],
        password: "my super secret password",
    });
    
    import pulumi
    import pulumi_artifactory as artifactory
    
    # Create a new Artifactory user called terraform
    test_user = artifactory.UnmanagedUser("test-user",
        name="terraform",
        email="test-user@artifactory-terraform.com",
        groups=["logged-in-users"],
        password="my super secret password")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-artifactory/sdk/v6/go/artifactory"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Create a new Artifactory user called terraform
    		_, err := artifactory.NewUnmanagedUser(ctx, "test-user", &artifactory.UnmanagedUserArgs{
    			Name:  pulumi.String("terraform"),
    			Email: pulumi.String("test-user@artifactory-terraform.com"),
    			Groups: pulumi.StringArray{
    				pulumi.String("logged-in-users"),
    			},
    			Password: pulumi.String("my super secret password"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Artifactory = Pulumi.Artifactory;
    
    return await Deployment.RunAsync(() => 
    {
        // Create a new Artifactory user called terraform
        var test_user = new Artifactory.UnmanagedUser("test-user", new()
        {
            Name = "terraform",
            Email = "test-user@artifactory-terraform.com",
            Groups = new[]
            {
                "logged-in-users",
            },
            Password = "my super secret password",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.artifactory.UnmanagedUser;
    import com.pulumi.artifactory.UnmanagedUserArgs;
    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) {
            // Create a new Artifactory user called terraform
            var test_user = new UnmanagedUser("test-user", UnmanagedUserArgs.builder()
                .name("terraform")
                .email("test-user@artifactory-terraform.com")
                .groups("logged-in-users")
                .password("my super secret password")
                .build());
    
        }
    }
    
    resources:
      # Create a new Artifactory user called terraform
      test-user:
        type: artifactory:UnmanagedUser
        properties:
          name: terraform
          email: test-user@artifactory-terraform.com
          groups:
            - logged-in-users
          password: my super secret password
    

    Managing groups relationship

    See our recommendation on how to manage user-group relationship.

    Create UnmanagedUser Resource

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

    Constructor syntax

    new UnmanagedUser(name: string, args: UnmanagedUserArgs, opts?: CustomResourceOptions);
    @overload
    def UnmanagedUser(resource_name: str,
                      args: UnmanagedUserArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def UnmanagedUser(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      email: Optional[str] = None,
                      admin: Optional[bool] = None,
                      disable_ui_access: Optional[bool] = None,
                      groups: Optional[Sequence[str]] = None,
                      internal_password_disabled: Optional[bool] = None,
                      name: Optional[str] = None,
                      password: Optional[str] = None,
                      profile_updatable: Optional[bool] = None)
    func NewUnmanagedUser(ctx *Context, name string, args UnmanagedUserArgs, opts ...ResourceOption) (*UnmanagedUser, error)
    public UnmanagedUser(string name, UnmanagedUserArgs args, CustomResourceOptions? opts = null)
    public UnmanagedUser(String name, UnmanagedUserArgs args)
    public UnmanagedUser(String name, UnmanagedUserArgs args, CustomResourceOptions options)
    
    type: artifactory:UnmanagedUser
    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 UnmanagedUserArgs
    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 UnmanagedUserArgs
    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 UnmanagedUserArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args UnmanagedUserArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args UnmanagedUserArgs
    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 unmanagedUserResource = new Artifactory.UnmanagedUser("unmanagedUserResource", new()
    {
        Email = "string",
        Admin = false,
        DisableUiAccess = false,
        Groups = new[]
        {
            "string",
        },
        InternalPasswordDisabled = false,
        Name = "string",
        Password = "string",
        ProfileUpdatable = false,
    });
    
    example, err := artifactory.NewUnmanagedUser(ctx, "unmanagedUserResource", &artifactory.UnmanagedUserArgs{
    	Email:           pulumi.String("string"),
    	Admin:           pulumi.Bool(false),
    	DisableUiAccess: pulumi.Bool(false),
    	Groups: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	InternalPasswordDisabled: pulumi.Bool(false),
    	Name:                     pulumi.String("string"),
    	Password:                 pulumi.String("string"),
    	ProfileUpdatable:         pulumi.Bool(false),
    })
    
    var unmanagedUserResource = new UnmanagedUser("unmanagedUserResource", UnmanagedUserArgs.builder()
        .email("string")
        .admin(false)
        .disableUiAccess(false)
        .groups("string")
        .internalPasswordDisabled(false)
        .name("string")
        .password("string")
        .profileUpdatable(false)
        .build());
    
    unmanaged_user_resource = artifactory.UnmanagedUser("unmanagedUserResource",
        email="string",
        admin=False,
        disable_ui_access=False,
        groups=["string"],
        internal_password_disabled=False,
        name="string",
        password="string",
        profile_updatable=False)
    
    const unmanagedUserResource = new artifactory.UnmanagedUser("unmanagedUserResource", {
        email: "string",
        admin: false,
        disableUiAccess: false,
        groups: ["string"],
        internalPasswordDisabled: false,
        name: "string",
        password: "string",
        profileUpdatable: false,
    });
    
    type: artifactory:UnmanagedUser
    properties:
        admin: false
        disableUiAccess: false
        email: string
        groups:
            - string
        internalPasswordDisabled: false
        name: string
        password: string
        profileUpdatable: false
    

    UnmanagedUser Resource Properties

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

    Inputs

    The UnmanagedUser resource accepts the following input properties:

    Email string
    Email for user.
    Admin bool
    When enabled, this user is an administrator with all the ensuing privileges. Default value is false.
    DisableUiAccess bool
    When set, this user can only access Artifactory through the REST API. This option cannot be set if the user has Admin privileges. Default value is true.
    Groups List<string>
    List of groups this user is a part of. Notes: If this attribute is not specified then user's group membership is set to empty. User will not be part of default "readers" group automatically.
    InternalPasswordDisabled bool
    When set, disables the fallback of using an internal password when external authentication (such as LDAP) is enabled.
    Name string
    Username for user. May contain lowercase letters, numbers and symbols: '.-_@'
    Password string
    Password for the user. When omitted, a random password is generated using the following password policy: 12 characters with 1 digit, 1 symbol, with upper and lower case letters.
    ProfileUpdatable bool
    When set, this user can update his profile details (except for the password. Only an administrator can update the password). Default value is true.
    Email string
    Email for user.
    Admin bool
    When enabled, this user is an administrator with all the ensuing privileges. Default value is false.
    DisableUiAccess bool
    When set, this user can only access Artifactory through the REST API. This option cannot be set if the user has Admin privileges. Default value is true.
    Groups []string
    List of groups this user is a part of. Notes: If this attribute is not specified then user's group membership is set to empty. User will not be part of default "readers" group automatically.
    InternalPasswordDisabled bool
    When set, disables the fallback of using an internal password when external authentication (such as LDAP) is enabled.
    Name string
    Username for user. May contain lowercase letters, numbers and symbols: '.-_@'
    Password string
    Password for the user. When omitted, a random password is generated using the following password policy: 12 characters with 1 digit, 1 symbol, with upper and lower case letters.
    ProfileUpdatable bool
    When set, this user can update his profile details (except for the password. Only an administrator can update the password). Default value is true.
    email String
    Email for user.
    admin Boolean
    When enabled, this user is an administrator with all the ensuing privileges. Default value is false.
    disableUiAccess Boolean
    When set, this user can only access Artifactory through the REST API. This option cannot be set if the user has Admin privileges. Default value is true.
    groups List<String>
    List of groups this user is a part of. Notes: If this attribute is not specified then user's group membership is set to empty. User will not be part of default "readers" group automatically.
    internalPasswordDisabled Boolean
    When set, disables the fallback of using an internal password when external authentication (such as LDAP) is enabled.
    name String
    Username for user. May contain lowercase letters, numbers and symbols: '.-_@'
    password String
    Password for the user. When omitted, a random password is generated using the following password policy: 12 characters with 1 digit, 1 symbol, with upper and lower case letters.
    profileUpdatable Boolean
    When set, this user can update his profile details (except for the password. Only an administrator can update the password). Default value is true.
    email string
    Email for user.
    admin boolean
    When enabled, this user is an administrator with all the ensuing privileges. Default value is false.
    disableUiAccess boolean
    When set, this user can only access Artifactory through the REST API. This option cannot be set if the user has Admin privileges. Default value is true.
    groups string[]
    List of groups this user is a part of. Notes: If this attribute is not specified then user's group membership is set to empty. User will not be part of default "readers" group automatically.
    internalPasswordDisabled boolean
    When set, disables the fallback of using an internal password when external authentication (such as LDAP) is enabled.
    name string
    Username for user. May contain lowercase letters, numbers and symbols: '.-_@'
    password string
    Password for the user. When omitted, a random password is generated using the following password policy: 12 characters with 1 digit, 1 symbol, with upper and lower case letters.
    profileUpdatable boolean
    When set, this user can update his profile details (except for the password. Only an administrator can update the password). Default value is true.
    email str
    Email for user.
    admin bool
    When enabled, this user is an administrator with all the ensuing privileges. Default value is false.
    disable_ui_access bool
    When set, this user can only access Artifactory through the REST API. This option cannot be set if the user has Admin privileges. Default value is true.
    groups Sequence[str]
    List of groups this user is a part of. Notes: If this attribute is not specified then user's group membership is set to empty. User will not be part of default "readers" group automatically.
    internal_password_disabled bool
    When set, disables the fallback of using an internal password when external authentication (such as LDAP) is enabled.
    name str
    Username for user. May contain lowercase letters, numbers and symbols: '.-_@'
    password str
    Password for the user. When omitted, a random password is generated using the following password policy: 12 characters with 1 digit, 1 symbol, with upper and lower case letters.
    profile_updatable bool
    When set, this user can update his profile details (except for the password. Only an administrator can update the password). Default value is true.
    email String
    Email for user.
    admin Boolean
    When enabled, this user is an administrator with all the ensuing privileges. Default value is false.
    disableUiAccess Boolean
    When set, this user can only access Artifactory through the REST API. This option cannot be set if the user has Admin privileges. Default value is true.
    groups List<String>
    List of groups this user is a part of. Notes: If this attribute is not specified then user's group membership is set to empty. User will not be part of default "readers" group automatically.
    internalPasswordDisabled Boolean
    When set, disables the fallback of using an internal password when external authentication (such as LDAP) is enabled.
    name String
    Username for user. May contain lowercase letters, numbers and symbols: '.-_@'
    password String
    Password for the user. When omitted, a random password is generated using the following password policy: 12 characters with 1 digit, 1 symbol, with upper and lower case letters.
    profileUpdatable Boolean
    When set, this user can update his profile details (except for the password. Only an administrator can update the password). Default value is true.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the UnmanagedUser 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 UnmanagedUser Resource

    Get an existing UnmanagedUser 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?: UnmanagedUserState, opts?: CustomResourceOptions): UnmanagedUser
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            admin: Optional[bool] = None,
            disable_ui_access: Optional[bool] = None,
            email: Optional[str] = None,
            groups: Optional[Sequence[str]] = None,
            internal_password_disabled: Optional[bool] = None,
            name: Optional[str] = None,
            password: Optional[str] = None,
            profile_updatable: Optional[bool] = None) -> UnmanagedUser
    func GetUnmanagedUser(ctx *Context, name string, id IDInput, state *UnmanagedUserState, opts ...ResourceOption) (*UnmanagedUser, error)
    public static UnmanagedUser Get(string name, Input<string> id, UnmanagedUserState? state, CustomResourceOptions? opts = null)
    public static UnmanagedUser get(String name, Output<String> id, UnmanagedUserState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    Admin bool
    When enabled, this user is an administrator with all the ensuing privileges. Default value is false.
    DisableUiAccess bool
    When set, this user can only access Artifactory through the REST API. This option cannot be set if the user has Admin privileges. Default value is true.
    Email string
    Email for user.
    Groups List<string>
    List of groups this user is a part of. Notes: If this attribute is not specified then user's group membership is set to empty. User will not be part of default "readers" group automatically.
    InternalPasswordDisabled bool
    When set, disables the fallback of using an internal password when external authentication (such as LDAP) is enabled.
    Name string
    Username for user. May contain lowercase letters, numbers and symbols: '.-_@'
    Password string
    Password for the user. When omitted, a random password is generated using the following password policy: 12 characters with 1 digit, 1 symbol, with upper and lower case letters.
    ProfileUpdatable bool
    When set, this user can update his profile details (except for the password. Only an administrator can update the password). Default value is true.
    Admin bool
    When enabled, this user is an administrator with all the ensuing privileges. Default value is false.
    DisableUiAccess bool
    When set, this user can only access Artifactory through the REST API. This option cannot be set if the user has Admin privileges. Default value is true.
    Email string
    Email for user.
    Groups []string
    List of groups this user is a part of. Notes: If this attribute is not specified then user's group membership is set to empty. User will not be part of default "readers" group automatically.
    InternalPasswordDisabled bool
    When set, disables the fallback of using an internal password when external authentication (such as LDAP) is enabled.
    Name string
    Username for user. May contain lowercase letters, numbers and symbols: '.-_@'
    Password string
    Password for the user. When omitted, a random password is generated using the following password policy: 12 characters with 1 digit, 1 symbol, with upper and lower case letters.
    ProfileUpdatable bool
    When set, this user can update his profile details (except for the password. Only an administrator can update the password). Default value is true.
    admin Boolean
    When enabled, this user is an administrator with all the ensuing privileges. Default value is false.
    disableUiAccess Boolean
    When set, this user can only access Artifactory through the REST API. This option cannot be set if the user has Admin privileges. Default value is true.
    email String
    Email for user.
    groups List<String>
    List of groups this user is a part of. Notes: If this attribute is not specified then user's group membership is set to empty. User will not be part of default "readers" group automatically.
    internalPasswordDisabled Boolean
    When set, disables the fallback of using an internal password when external authentication (such as LDAP) is enabled.
    name String
    Username for user. May contain lowercase letters, numbers and symbols: '.-_@'
    password String
    Password for the user. When omitted, a random password is generated using the following password policy: 12 characters with 1 digit, 1 symbol, with upper and lower case letters.
    profileUpdatable Boolean
    When set, this user can update his profile details (except for the password. Only an administrator can update the password). Default value is true.
    admin boolean
    When enabled, this user is an administrator with all the ensuing privileges. Default value is false.
    disableUiAccess boolean
    When set, this user can only access Artifactory through the REST API. This option cannot be set if the user has Admin privileges. Default value is true.
    email string
    Email for user.
    groups string[]
    List of groups this user is a part of. Notes: If this attribute is not specified then user's group membership is set to empty. User will not be part of default "readers" group automatically.
    internalPasswordDisabled boolean
    When set, disables the fallback of using an internal password when external authentication (such as LDAP) is enabled.
    name string
    Username for user. May contain lowercase letters, numbers and symbols: '.-_@'
    password string
    Password for the user. When omitted, a random password is generated using the following password policy: 12 characters with 1 digit, 1 symbol, with upper and lower case letters.
    profileUpdatable boolean
    When set, this user can update his profile details (except for the password. Only an administrator can update the password). Default value is true.
    admin bool
    When enabled, this user is an administrator with all the ensuing privileges. Default value is false.
    disable_ui_access bool
    When set, this user can only access Artifactory through the REST API. This option cannot be set if the user has Admin privileges. Default value is true.
    email str
    Email for user.
    groups Sequence[str]
    List of groups this user is a part of. Notes: If this attribute is not specified then user's group membership is set to empty. User will not be part of default "readers" group automatically.
    internal_password_disabled bool
    When set, disables the fallback of using an internal password when external authentication (such as LDAP) is enabled.
    name str
    Username for user. May contain lowercase letters, numbers and symbols: '.-_@'
    password str
    Password for the user. When omitted, a random password is generated using the following password policy: 12 characters with 1 digit, 1 symbol, with upper and lower case letters.
    profile_updatable bool
    When set, this user can update his profile details (except for the password. Only an administrator can update the password). Default value is true.
    admin Boolean
    When enabled, this user is an administrator with all the ensuing privileges. Default value is false.
    disableUiAccess Boolean
    When set, this user can only access Artifactory through the REST API. This option cannot be set if the user has Admin privileges. Default value is true.
    email String
    Email for user.
    groups List<String>
    List of groups this user is a part of. Notes: If this attribute is not specified then user's group membership is set to empty. User will not be part of default "readers" group automatically.
    internalPasswordDisabled Boolean
    When set, disables the fallback of using an internal password when external authentication (such as LDAP) is enabled.
    name String
    Username for user. May contain lowercase letters, numbers and symbols: '.-_@'
    password String
    Password for the user. When omitted, a random password is generated using the following password policy: 12 characters with 1 digit, 1 symbol, with upper and lower case letters.
    profileUpdatable Boolean
    When set, this user can update his profile details (except for the password. Only an administrator can update the password). Default value is true.

    Import

    Users can be imported using their name, e.g.

    $ pulumi import artifactory:index/unmanagedUser:UnmanagedUser test-user myusername
    

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

    Package Details

    Repository
    artifactory pulumi/pulumi-artifactory
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the artifactory Terraform Provider.
    artifactory logo
    artifactory v6.8.4 published on Thursday, Jun 6, 2024 by Pulumi