authentik.User
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as authentik from "@pulumi/authentik";
// Create a user
const nameUser = new authentik.User("nameUser", {username: "user"});
// Create a user that is member of a group
const group = new authentik.Group("group", {});
const nameIndex_userUser = new authentik.User("nameIndex/userUser", {
    username: "user",
    groups: [group.groupId],
});
import pulumi
import pulumi_authentik as authentik
# Create a user
name_user = authentik.User("nameUser", username="user")
# Create a user that is member of a group
group = authentik.Group("group")
name_index_user_user = authentik.User("nameIndex/userUser",
    username="user",
    groups=[group.group_id])
package main
import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/authentik/v2025/authentik"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Create a user
		_, err := authentik.NewUser(ctx, "nameUser", &authentik.UserArgs{
			Username: pulumi.String("user"),
		})
		if err != nil {
			return err
		}
		group, err := authentik.NewGroup(ctx, "group", nil)
		if err != nil {
			return err
		}
		_, err = authentik.NewUser(ctx, "nameIndex/userUser", &authentik.UserArgs{
			Username: pulumi.String("user"),
			Groups: pulumi.StringArray{
				group.GroupId,
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Authentik = Pulumi.Authentik;
return await Deployment.RunAsync(() => 
{
    // Create a user
    var nameUser = new Authentik.User("nameUser", new()
    {
        Username = "user",
    });
    // Create a user that is member of a group
    var @group = new Authentik.Group("group");
    var nameIndex_userUser = new Authentik.User("nameIndex/userUser", new()
    {
        Username = "user",
        Groups = new[]
        {
            @group.GroupId,
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.authentik.User;
import com.pulumi.authentik.UserArgs;
import com.pulumi.authentik.Group;
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 user
        var nameUser = new User("nameUser", UserArgs.builder()
            .username("user")
            .build());
        // Create a user that is member of a group
        var group = new Group("group");
        var nameIndex_userUser = new User("nameIndex/userUser", UserArgs.builder()
            .username("user")
            .groups(group.groupId())
            .build());
    }
}
resources:
  # Create a user
  nameUser: # Create a user that is member of a group
    type: authentik:User
    properties:
      username: user
  group:
    type: authentik:Group
  nameIndex/userUser:
    type: authentik:User
    properties:
      username: user
      groups:
        - ${group.groupId}
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,
         username: Optional[str] = None,
         attributes: Optional[str] = None,
         email: Optional[str] = None,
         groups: Optional[Sequence[str]] = None,
         is_active: Optional[bool] = None,
         name: Optional[str] = None,
         password: Optional[str] = None,
         path: Optional[str] = None,
         type: Optional[str] = None,
         user_id: Optional[str] = None)func NewUser(ctx *Context, name string, args UserArgs, opts ...ResourceOption) (*User, error)public User(string name, UserArgs args, CustomResourceOptions? opts = null)type: authentik: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 Authentik.User("userResource", new()
{
    Username = "string",
    Attributes = "string",
    Email = "string",
    Groups = new[]
    {
        "string",
    },
    IsActive = false,
    Name = "string",
    Password = "string",
    Path = "string",
    Type = "string",
    UserId = "string",
});
example, err := authentik.NewUser(ctx, "userResource", &authentik.UserArgs{
	Username:   pulumi.String("string"),
	Attributes: pulumi.String("string"),
	Email:      pulumi.String("string"),
	Groups: pulumi.StringArray{
		pulumi.String("string"),
	},
	IsActive: pulumi.Bool(false),
	Name:     pulumi.String("string"),
	Password: pulumi.String("string"),
	Path:     pulumi.String("string"),
	Type:     pulumi.String("string"),
	UserId:   pulumi.String("string"),
})
var userResource = new User("userResource", UserArgs.builder()
    .username("string")
    .attributes("string")
    .email("string")
    .groups("string")
    .isActive(false)
    .name("string")
    .password("string")
    .path("string")
    .type("string")
    .userId("string")
    .build());
user_resource = authentik.User("userResource",
    username="string",
    attributes="string",
    email="string",
    groups=["string"],
    is_active=False,
    name="string",
    password="string",
    path="string",
    type="string",
    user_id="string")
const userResource = new authentik.User("userResource", {
    username: "string",
    attributes: "string",
    email: "string",
    groups: ["string"],
    isActive: false,
    name: "string",
    password: "string",
    path: "string",
    type: "string",
    userId: "string",
});
type: authentik:User
properties:
    attributes: string
    email: string
    groups:
        - string
    isActive: false
    name: string
    password: string
    path: string
    type: string
    userId: 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:
- Username string
- Attributes string
- JSON format expected. Use jsonencode() to pass objects. Defaults to {}.
- Email string
- Groups List<string>
- Generated.
- IsActive bool
- Defaults to true.
- Name string
- Defaults to ``.
- Password string
- Optionally set the user's password. Changing the password in authentik will not trigger an update here.
- Path string
- Defaults to users.
- Type string
- Allowed values: - internal-external-service_account-internal_service_accountDefaults tointernal.
- UserId string
- Username string
- Attributes string
- JSON format expected. Use jsonencode() to pass objects. Defaults to {}.
- Email string
- Groups []string
- Generated.
- IsActive bool
- Defaults to true.
- Name string
- Defaults to ``.
- Password string
- Optionally set the user's password. Changing the password in authentik will not trigger an update here.
- Path string
- Defaults to users.
- Type string
- Allowed values: - internal-external-service_account-internal_service_accountDefaults tointernal.
- UserId string
- username String
- attributes String
- JSON format expected. Use jsonencode() to pass objects. Defaults to {}.
- email String
- groups List<String>
- Generated.
- isActive Boolean
- Defaults to true.
- name String
- Defaults to ``.
- password String
- Optionally set the user's password. Changing the password in authentik will not trigger an update here.
- path String
- Defaults to users.
- type String
- Allowed values: - internal-external-service_account-internal_service_accountDefaults tointernal.
- userId String
- username string
- attributes string
- JSON format expected. Use jsonencode() to pass objects. Defaults to {}.
- email string
- groups string[]
- Generated.
- isActive boolean
- Defaults to true.
- name string
- Defaults to ``.
- password string
- Optionally set the user's password. Changing the password in authentik will not trigger an update here.
- path string
- Defaults to users.
- type string
- Allowed values: - internal-external-service_account-internal_service_accountDefaults tointernal.
- userId string
- username str
- attributes str
- JSON format expected. Use jsonencode() to pass objects. Defaults to {}.
- email str
- groups Sequence[str]
- Generated.
- is_active bool
- Defaults to true.
- name str
- Defaults to ``.
- password str
- Optionally set the user's password. Changing the password in authentik will not trigger an update here.
- path str
- Defaults to users.
- type str
- Allowed values: - internal-external-service_account-internal_service_accountDefaults tointernal.
- user_id str
- username String
- attributes String
- JSON format expected. Use jsonencode() to pass objects. Defaults to {}.
- email String
- groups List<String>
- Generated.
- isActive Boolean
- Defaults to true.
- name String
- Defaults to ``.
- password String
- Optionally set the user's password. Changing the password in authentik will not trigger an update here.
- path String
- Defaults to users.
- type String
- Allowed values: - internal-external-service_account-internal_service_accountDefaults tointernal.
- userId String
Outputs
All input properties are implicitly available as output properties. Additionally, the User 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 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,
        attributes: Optional[str] = None,
        email: Optional[str] = None,
        groups: Optional[Sequence[str]] = None,
        is_active: Optional[bool] = None,
        name: Optional[str] = None,
        password: Optional[str] = None,
        path: Optional[str] = None,
        type: Optional[str] = None,
        user_id: Optional[str] = None,
        username: Optional[str] = None) -> Userfunc 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: authentik: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.
- Attributes string
- JSON format expected. Use jsonencode() to pass objects. Defaults to {}.
- Email string
- Groups List<string>
- Generated.
- IsActive bool
- Defaults to true.
- Name string
- Defaults to ``.
- Password string
- Optionally set the user's password. Changing the password in authentik will not trigger an update here.
- Path string
- Defaults to users.
- Type string
- Allowed values: - internal-external-service_account-internal_service_accountDefaults tointernal.
- UserId string
- Username string
- Attributes string
- JSON format expected. Use jsonencode() to pass objects. Defaults to {}.
- Email string
- Groups []string
- Generated.
- IsActive bool
- Defaults to true.
- Name string
- Defaults to ``.
- Password string
- Optionally set the user's password. Changing the password in authentik will not trigger an update here.
- Path string
- Defaults to users.
- Type string
- Allowed values: - internal-external-service_account-internal_service_accountDefaults tointernal.
- UserId string
- Username string
- attributes String
- JSON format expected. Use jsonencode() to pass objects. Defaults to {}.
- email String
- groups List<String>
- Generated.
- isActive Boolean
- Defaults to true.
- name String
- Defaults to ``.
- password String
- Optionally set the user's password. Changing the password in authentik will not trigger an update here.
- path String
- Defaults to users.
- type String
- Allowed values: - internal-external-service_account-internal_service_accountDefaults tointernal.
- userId String
- username String
- attributes string
- JSON format expected. Use jsonencode() to pass objects. Defaults to {}.
- email string
- groups string[]
- Generated.
- isActive boolean
- Defaults to true.
- name string
- Defaults to ``.
- password string
- Optionally set the user's password. Changing the password in authentik will not trigger an update here.
- path string
- Defaults to users.
- type string
- Allowed values: - internal-external-service_account-internal_service_accountDefaults tointernal.
- userId string
- username string
- attributes str
- JSON format expected. Use jsonencode() to pass objects. Defaults to {}.
- email str
- groups Sequence[str]
- Generated.
- is_active bool
- Defaults to true.
- name str
- Defaults to ``.
- password str
- Optionally set the user's password. Changing the password in authentik will not trigger an update here.
- path str
- Defaults to users.
- type str
- Allowed values: - internal-external-service_account-internal_service_accountDefaults tointernal.
- user_id str
- username str
- attributes String
- JSON format expected. Use jsonencode() to pass objects. Defaults to {}.
- email String
- groups List<String>
- Generated.
- isActive Boolean
- Defaults to true.
- name String
- Defaults to ``.
- password String
- Optionally set the user's password. Changing the password in authentik will not trigger an update here.
- path String
- Defaults to users.
- type String
- Allowed values: - internal-external-service_account-internal_service_accountDefaults tointernal.
- userId String
- username String
Package Details
- Repository
- authentik goauthentik/terraform-provider-authentik
- License
- Notes
- This Pulumi package is based on the authentikTerraform Provider.