1. Packages
  2. Artifactory
  3. API Docs
  4. UnmanagedUser
artifactory v6.4.2 published on Thursday, Mar 28, 2024 by Pulumi

artifactory.UnmanagedUser

Explore with Pulumi AI

artifactory logo
artifactory v6.4.2 published on Thursday, Mar 28, 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", {
        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",
        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{
    			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()
        {
            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) {
            var test_user = new UnmanagedUser("test-user", UnmanagedUserArgs.builder()        
                .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:
          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

    new UnmanagedUser(name: string, args: UnmanagedUserArgs, opts?: CustomResourceOptions);
    @overload
    def UnmanagedUser(resource_name: 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)
    @overload
    def UnmanagedUser(resource_name: str,
                      args: UnmanagedUserArgs,
                      opts: Optional[ResourceOptions] = 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.
    
    
    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.

    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
    

    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.4.2 published on Thursday, Mar 28, 2024 by Pulumi