published on Sunday, Feb 22, 2026 by datadrivers
published on Sunday, Feb 22, 2026 by datadrivers
Use this resource to manage users.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as nexus from "@pulumi/nexus";
const admin = new nexus.SecurityUser("admin", {
userid: "admin",
firstname: "Administrator",
lastname: "User",
email: "nexus@example.com",
password: "admin123",
roles: ["nx-admin"],
status: "active",
});
import pulumi
import pulumi_nexus as nexus
admin = nexus.SecurityUser("admin",
userid="admin",
firstname="Administrator",
lastname="User",
email="nexus@example.com",
password="admin123",
roles=["nx-admin"],
status="active")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/nexus/v2/nexus"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := nexus.NewSecurityUser(ctx, "admin", &nexus.SecurityUserArgs{
Userid: pulumi.String("admin"),
Firstname: pulumi.String("Administrator"),
Lastname: pulumi.String("User"),
Email: pulumi.String("nexus@example.com"),
Password: pulumi.String("admin123"),
Roles: pulumi.StringArray{
pulumi.String("nx-admin"),
},
Status: pulumi.String("active"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nexus = Pulumi.Nexus;
return await Deployment.RunAsync(() =>
{
var admin = new Nexus.SecurityUser("admin", new()
{
Userid = "admin",
Firstname = "Administrator",
Lastname = "User",
Email = "nexus@example.com",
Password = "admin123",
Roles = new[]
{
"nx-admin",
},
Status = "active",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.nexus.SecurityUser;
import com.pulumi.nexus.SecurityUserArgs;
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 admin = new SecurityUser("admin", SecurityUserArgs.builder()
.userid("admin")
.firstname("Administrator")
.lastname("User")
.email("nexus@example.com")
.password("admin123")
.roles("nx-admin")
.status("active")
.build());
}
}
resources:
admin:
type: nexus:SecurityUser
properties:
userid: admin
firstname: Administrator
lastname: User
email: nexus@example.com
password: admin123
roles:
- nx-admin
status: active
Create SecurityUser Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SecurityUser(name: string, args: SecurityUserArgs, opts?: CustomResourceOptions);@overload
def SecurityUser(resource_name: str,
args: SecurityUserArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SecurityUser(resource_name: str,
opts: Optional[ResourceOptions] = None,
email: Optional[str] = None,
firstname: Optional[str] = None,
lastname: Optional[str] = None,
userid: Optional[str] = None,
password: Optional[str] = None,
password_wo: Optional[str] = None,
password_wo_version: Optional[float] = None,
roles: Optional[Sequence[str]] = None,
status: Optional[str] = None)func NewSecurityUser(ctx *Context, name string, args SecurityUserArgs, opts ...ResourceOption) (*SecurityUser, error)public SecurityUser(string name, SecurityUserArgs args, CustomResourceOptions? opts = null)
public SecurityUser(String name, SecurityUserArgs args)
public SecurityUser(String name, SecurityUserArgs args, CustomResourceOptions options)
type: nexus:SecurityUser
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 SecurityUserArgs
- 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 SecurityUserArgs
- 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 SecurityUserArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SecurityUserArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SecurityUserArgs
- 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 securityUserResource = new Nexus.SecurityUser("securityUserResource", new()
{
Email = "string",
Firstname = "string",
Lastname = "string",
Userid = "string",
Password = "string",
PasswordWo = "string",
PasswordWoVersion = 0,
Roles = new[]
{
"string",
},
Status = "string",
});
example, err := nexus.NewSecurityUser(ctx, "securityUserResource", &nexus.SecurityUserArgs{
Email: pulumi.String("string"),
Firstname: pulumi.String("string"),
Lastname: pulumi.String("string"),
Userid: pulumi.String("string"),
Password: pulumi.String("string"),
PasswordWo: pulumi.String("string"),
PasswordWoVersion: pulumi.Float64(0),
Roles: pulumi.StringArray{
pulumi.String("string"),
},
Status: pulumi.String("string"),
})
var securityUserResource = new SecurityUser("securityUserResource", SecurityUserArgs.builder()
.email("string")
.firstname("string")
.lastname("string")
.userid("string")
.password("string")
.passwordWo("string")
.passwordWoVersion(0.0)
.roles("string")
.status("string")
.build());
security_user_resource = nexus.SecurityUser("securityUserResource",
email="string",
firstname="string",
lastname="string",
userid="string",
password="string",
password_wo="string",
password_wo_version=0,
roles=["string"],
status="string")
const securityUserResource = new nexus.SecurityUser("securityUserResource", {
email: "string",
firstname: "string",
lastname: "string",
userid: "string",
password: "string",
passwordWo: "string",
passwordWoVersion: 0,
roles: ["string"],
status: "string",
});
type: nexus:SecurityUser
properties:
email: string
firstname: string
lastname: string
password: string
passwordWo: string
passwordWoVersion: 0
roles:
- string
status: string
userid: string
SecurityUser 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 SecurityUser resource accepts the following input properties:
- Email string
- The email address associated with the user.
- Firstname string
- The first name of the user.
- Lastname string
- The last name of the user.
- Userid string
- The userid which is required for login. This value cannot be changed.
- Password string
- The password for the user.
- Password
Wo string - The password for the user (write-only, not stored in state). Use with password_wo_version to control updates.
- Password
Wo doubleVersion - Version tracker for password_wo changes. Increment this value to force a password update when using password_wo.
- Roles List<string>
- The roles which the user has been assigned within Nexus.
- Status string
- The user's status, e.g. active or disabled.
- Email string
- The email address associated with the user.
- Firstname string
- The first name of the user.
- Lastname string
- The last name of the user.
- Userid string
- The userid which is required for login. This value cannot be changed.
- Password string
- The password for the user.
- Password
Wo string - The password for the user (write-only, not stored in state). Use with password_wo_version to control updates.
- Password
Wo float64Version - Version tracker for password_wo changes. Increment this value to force a password update when using password_wo.
- Roles []string
- The roles which the user has been assigned within Nexus.
- Status string
- The user's status, e.g. active or disabled.
- email String
- The email address associated with the user.
- firstname String
- The first name of the user.
- lastname String
- The last name of the user.
- userid String
- The userid which is required for login. This value cannot be changed.
- password String
- The password for the user.
- password
Wo String - The password for the user (write-only, not stored in state). Use with password_wo_version to control updates.
- password
Wo DoubleVersion - Version tracker for password_wo changes. Increment this value to force a password update when using password_wo.
- roles List<String>
- The roles which the user has been assigned within Nexus.
- status String
- The user's status, e.g. active or disabled.
- email string
- The email address associated with the user.
- firstname string
- The first name of the user.
- lastname string
- The last name of the user.
- userid string
- The userid which is required for login. This value cannot be changed.
- password string
- The password for the user.
- password
Wo string - The password for the user (write-only, not stored in state). Use with password_wo_version to control updates.
- password
Wo numberVersion - Version tracker for password_wo changes. Increment this value to force a password update when using password_wo.
- roles string[]
- The roles which the user has been assigned within Nexus.
- status string
- The user's status, e.g. active or disabled.
- email str
- The email address associated with the user.
- firstname str
- The first name of the user.
- lastname str
- The last name of the user.
- userid str
- The userid which is required for login. This value cannot be changed.
- password str
- The password for the user.
- password_
wo str - The password for the user (write-only, not stored in state). Use with password_wo_version to control updates.
- password_
wo_ floatversion - Version tracker for password_wo changes. Increment this value to force a password update when using password_wo.
- roles Sequence[str]
- The roles which the user has been assigned within Nexus.
- status str
- The user's status, e.g. active or disabled.
- email String
- The email address associated with the user.
- firstname String
- The first name of the user.
- lastname String
- The last name of the user.
- userid String
- The userid which is required for login. This value cannot be changed.
- password String
- The password for the user.
- password
Wo String - The password for the user (write-only, not stored in state). Use with password_wo_version to control updates.
- password
Wo NumberVersion - Version tracker for password_wo changes. Increment this value to force a password update when using password_wo.
- roles List<String>
- The roles which the user has been assigned within Nexus.
- status String
- The user's status, e.g. active or disabled.
Outputs
All input properties are implicitly available as output properties. Additionally, the SecurityUser 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 SecurityUser Resource
Get an existing SecurityUser 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?: SecurityUserState, opts?: CustomResourceOptions): SecurityUser@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
email: Optional[str] = None,
firstname: Optional[str] = None,
lastname: Optional[str] = None,
password: Optional[str] = None,
password_wo: Optional[str] = None,
password_wo_version: Optional[float] = None,
roles: Optional[Sequence[str]] = None,
status: Optional[str] = None,
userid: Optional[str] = None) -> SecurityUserfunc GetSecurityUser(ctx *Context, name string, id IDInput, state *SecurityUserState, opts ...ResourceOption) (*SecurityUser, error)public static SecurityUser Get(string name, Input<string> id, SecurityUserState? state, CustomResourceOptions? opts = null)public static SecurityUser get(String name, Output<String> id, SecurityUserState state, CustomResourceOptions options)resources: _: type: nexus:SecurityUser 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.
- Email string
- The email address associated with the user.
- Firstname string
- The first name of the user.
- Lastname string
- The last name of the user.
- Password string
- The password for the user.
- Password
Wo string - The password for the user (write-only, not stored in state). Use with password_wo_version to control updates.
- Password
Wo doubleVersion - Version tracker for password_wo changes. Increment this value to force a password update when using password_wo.
- Roles List<string>
- The roles which the user has been assigned within Nexus.
- Status string
- The user's status, e.g. active or disabled.
- Userid string
- The userid which is required for login. This value cannot be changed.
- Email string
- The email address associated with the user.
- Firstname string
- The first name of the user.
- Lastname string
- The last name of the user.
- Password string
- The password for the user.
- Password
Wo string - The password for the user (write-only, not stored in state). Use with password_wo_version to control updates.
- Password
Wo float64Version - Version tracker for password_wo changes. Increment this value to force a password update when using password_wo.
- Roles []string
- The roles which the user has been assigned within Nexus.
- Status string
- The user's status, e.g. active or disabled.
- Userid string
- The userid which is required for login. This value cannot be changed.
- email String
- The email address associated with the user.
- firstname String
- The first name of the user.
- lastname String
- The last name of the user.
- password String
- The password for the user.
- password
Wo String - The password for the user (write-only, not stored in state). Use with password_wo_version to control updates.
- password
Wo DoubleVersion - Version tracker for password_wo changes. Increment this value to force a password update when using password_wo.
- roles List<String>
- The roles which the user has been assigned within Nexus.
- status String
- The user's status, e.g. active or disabled.
- userid String
- The userid which is required for login. This value cannot be changed.
- email string
- The email address associated with the user.
- firstname string
- The first name of the user.
- lastname string
- The last name of the user.
- password string
- The password for the user.
- password
Wo string - The password for the user (write-only, not stored in state). Use with password_wo_version to control updates.
- password
Wo numberVersion - Version tracker for password_wo changes. Increment this value to force a password update when using password_wo.
- roles string[]
- The roles which the user has been assigned within Nexus.
- status string
- The user's status, e.g. active or disabled.
- userid string
- The userid which is required for login. This value cannot be changed.
- email str
- The email address associated with the user.
- firstname str
- The first name of the user.
- lastname str
- The last name of the user.
- password str
- The password for the user.
- password_
wo str - The password for the user (write-only, not stored in state). Use with password_wo_version to control updates.
- password_
wo_ floatversion - Version tracker for password_wo changes. Increment this value to force a password update when using password_wo.
- roles Sequence[str]
- The roles which the user has been assigned within Nexus.
- status str
- The user's status, e.g. active or disabled.
- userid str
- The userid which is required for login. This value cannot be changed.
- email String
- The email address associated with the user.
- firstname String
- The first name of the user.
- lastname String
- The last name of the user.
- password String
- The password for the user.
- password
Wo String - The password for the user (write-only, not stored in state). Use with password_wo_version to control updates.
- password
Wo NumberVersion - Version tracker for password_wo changes. Increment this value to force a password update when using password_wo.
- roles List<String>
- The roles which the user has been assigned within Nexus.
- status String
- The user's status, e.g. active or disabled.
- userid String
- The userid which is required for login. This value cannot be changed.
Import
import using the userid of the user
$ pulumi import nexus:index/securityUser:SecurityUser admin admin
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- nexus datadrivers/terraform-provider-nexus
- License
- Notes
- This Pulumi package is based on the
nexusTerraform Provider.
published on Sunday, Feb 22, 2026 by datadrivers
