1. Registry
  2. Packages
  3. Authentik Provider
  4. API Docs
  5. Agent
Viewing docs for authentik 2026.8.0
published on Wednesday, Sep 9, 2026 by goauthentik
Viewing docs for authentik 2026.8.0
published on Wednesday, Sep 9, 2026 by goauthentik

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as authentik from "@pulumi/authentik";
    
    const exampleAgentParent = new authentik.User("example_agent_parent", {
        username: "example-agent-parent",
        name: "Example Agent Parent",
    });
    const example = new authentik.Agent("example", {
        username: "example-agent",
        name: "Example Agent",
        parent: exampleAgentParent.userId,
        policyBehavior: "mirror",
        isActive: true,
    });
    
    import pulumi
    import pulumi_authentik as authentik
    
    example_agent_parent = authentik.User("example_agent_parent",
        username="example-agent-parent",
        name="Example Agent Parent")
    example = authentik.Agent("example",
        username="example-agent",
        name="Example Agent",
        parent=example_agent_parent.user_id,
        policy_behavior="mirror",
        is_active=True)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/authentik/v2026/authentik"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleAgentParent, err := authentik.NewUser(ctx, "example_agent_parent", &authentik.UserArgs{
    			Username: pulumi.String("example-agent-parent"),
    			Name:     pulumi.String("Example Agent Parent"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = authentik.NewAgent(ctx, "example", &authentik.AgentArgs{
    			Username:       pulumi.String("example-agent"),
    			Name:           pulumi.String("Example Agent"),
    			Parent:         exampleAgentParent.UserId,
    			PolicyBehavior: pulumi.String("mirror"),
    			IsActive:       pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Authentik = Pulumi.Authentik;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleAgentParent = new Authentik.User("example_agent_parent", new()
        {
            Username = "example-agent-parent",
            Name = "Example Agent Parent",
        });
    
        var example = new Authentik.Agent("example", new()
        {
            Username = "example-agent",
            Name = "Example Agent",
            Parent = exampleAgentParent.UserId,
            PolicyBehavior = "mirror",
            IsActive = true,
        });
    
    });
    
    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.Agent;
    import com.pulumi.authentik.AgentArgs;
    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 exampleAgentParent = new User("exampleAgentParent", UserArgs.builder()
                .username("example-agent-parent")
                .name("Example Agent Parent")
                .build());
    
            var example = new Agent("example", AgentArgs.builder()
                .username("example-agent")
                .name("Example Agent")
                .parent(exampleAgentParent.userId())
                .policyBehavior("mirror")
                .isActive(true)
                .build());
    
        }
    }
    
    resources:
      exampleAgentParent:
        type: authentik:User
        name: example_agent_parent
        properties:
          username: example-agent-parent
          name: Example Agent Parent
      example:
        type: authentik:Agent
        properties:
          username: example-agent
          name: Example Agent
          parent: ${exampleAgentParent.userId}
          policyBehavior: mirror
          isActive: true
    
    Example coming soon!
    

    Create Agent Resource

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

    Constructor syntax

    new Agent(name: string, args: AgentArgs, opts?: CustomResourceOptions);
    @overload
    def Agent(resource_name: str,
              args: AgentArgs,
              opts: Optional[ResourceOptions] = None)
    
    @overload
    def Agent(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              username: Optional[str] = None,
              agent_id: Optional[str] = None,
              attributes: Optional[str] = None,
              email: Optional[str] = None,
              expires: Optional[str] = None,
              expiring: Optional[bool] = None,
              is_active: Optional[bool] = None,
              name: Optional[str] = None,
              parent: Optional[float] = None,
              policy_behavior: Optional[str] = None)
    func NewAgent(ctx *Context, name string, args AgentArgs, opts ...ResourceOption) (*Agent, error)
    public Agent(string name, AgentArgs args, CustomResourceOptions? opts = null)
    public Agent(String name, AgentArgs args)
    public Agent(String name, AgentArgs args, CustomResourceOptions options)
    
    type: authentik:Agent
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "authentik_agent" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args AgentArgs
    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 AgentArgs
    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 AgentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AgentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AgentArgs
    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 agentResource = new Authentik.Agent("agentResource", new()
    {
        Username = "string",
        AgentId = "string",
        Attributes = "string",
        Email = "string",
        Expires = "string",
        Expiring = false,
        IsActive = false,
        Name = "string",
        Parent = 0.0,
        PolicyBehavior = "string",
    });
    
    example, err := authentik.NewAgent(ctx, "agentResource", &authentik.AgentArgs{
    	Username:       pulumi.String("string"),
    	AgentId:        pulumi.String("string"),
    	Attributes:     pulumi.String("string"),
    	Email:          pulumi.String("string"),
    	Expires:        pulumi.String("string"),
    	Expiring:       pulumi.Bool(false),
    	IsActive:       pulumi.Bool(false),
    	Name:           pulumi.String("string"),
    	Parent:         pulumi.Float64(0),
    	PolicyBehavior: pulumi.String("string"),
    })
    
    resource "authentik_agent" "agentResource" {
      lifecycle {
        create_before_destroy = true
      }
      username        = "string"
      agent_id        = "string"
      attributes      = "string"
      email           = "string"
      expires         = "string"
      expiring        = false
      is_active       = false
      name            = "string"
      parent          = 0
      policy_behavior = "string"
    }
    
    var agentResource = new Agent("agentResource", AgentArgs.builder()
        .username("string")
        .agentId("string")
        .attributes("string")
        .email("string")
        .expires("string")
        .expiring(false)
        .isActive(false)
        .name("string")
        .parent(0.0)
        .policyBehavior("string")
        .build());
    
    agent_resource = authentik.Agent("agentResource",
        username="string",
        agent_id="string",
        attributes="string",
        email="string",
        expires="string",
        expiring=False,
        is_active=False,
        name="string",
        parent=float(0),
        policy_behavior="string")
    
    const agentResource = new authentik.Agent("agentResource", {
        username: "string",
        agentId: "string",
        attributes: "string",
        email: "string",
        expires: "string",
        expiring: false,
        isActive: false,
        name: "string",
        parent: 0,
        policyBehavior: "string",
    });
    
    type: authentik:Agent
    properties:
        agentId: string
        attributes: string
        email: string
        expires: string
        expiring: false
        isActive: false
        name: string
        parent: 0
        policyBehavior: string
        username: string
    

    Agent 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 Agent resource accepts the following input properties:

    Username string
    AgentId string
    Attributes string
    JSON format expected. Use jsonencode() to pass objects. Defaults to {}.
    Email string
    Expires string
    Expiring bool
    Defaults to false.
    IsActive bool
    Defaults to true.
    Name string
    Defaults to ``.
    Parent double
    PK of the user that owns this agent. If not set, a new parent user is created automatically. Generated.
    PolicyBehavior string
    Allowed values:

    • mirror
    • copy
    • none Mirroring/copying requires an explicit parent; without one the server falls back to none. Generated.
    Username string
    AgentId string
    Attributes string
    JSON format expected. Use jsonencode() to pass objects. Defaults to {}.
    Email string
    Expires string
    Expiring bool
    Defaults to false.
    IsActive bool
    Defaults to true.
    Name string
    Defaults to ``.
    Parent float64
    PK of the user that owns this agent. If not set, a new parent user is created automatically. Generated.
    PolicyBehavior string
    Allowed values:

    • mirror
    • copy
    • none Mirroring/copying requires an explicit parent; without one the server falls back to none. Generated.
    username string
    agent_id string
    attributes string
    JSON format expected. Use jsonencode() to pass objects. Defaults to {}.
    email string
    expires string
    expiring bool
    Defaults to false.
    is_active bool
    Defaults to true.
    name string
    Defaults to ``.
    parent number
    PK of the user that owns this agent. If not set, a new parent user is created automatically. Generated.
    policy_behavior string
    Allowed values:

    • mirror
    • copy
    • none Mirroring/copying requires an explicit parent; without one the server falls back to none. Generated.
    username String
    agentId String
    attributes String
    JSON format expected. Use jsonencode() to pass objects. Defaults to {}.
    email String
    expires String
    expiring Boolean
    Defaults to false.
    isActive Boolean
    Defaults to true.
    name String
    Defaults to ``.
    parent Double
    PK of the user that owns this agent. If not set, a new parent user is created automatically. Generated.
    policyBehavior String
    Allowed values:

    • mirror
    • copy
    • none Mirroring/copying requires an explicit parent; without one the server falls back to none. Generated.
    username string
    agentId string
    attributes string
    JSON format expected. Use jsonencode() to pass objects. Defaults to {}.
    email string
    expires string
    expiring boolean
    Defaults to false.
    isActive boolean
    Defaults to true.
    name string
    Defaults to ``.
    parent number
    PK of the user that owns this agent. If not set, a new parent user is created automatically. Generated.
    policyBehavior string
    Allowed values:

    • mirror
    • copy
    • none Mirroring/copying requires an explicit parent; without one the server falls back to none. Generated.
    username str
    agent_id str
    attributes str
    JSON format expected. Use jsonencode() to pass objects. Defaults to {}.
    email str
    expires str
    expiring bool
    Defaults to false.
    is_active bool
    Defaults to true.
    name str
    Defaults to ``.
    parent float
    PK of the user that owns this agent. If not set, a new parent user is created automatically. Generated.
    policy_behavior str
    Allowed values:

    • mirror
    • copy
    • none Mirroring/copying requires an explicit parent; without one the server falls back to none. Generated.
    username String
    agentId String
    attributes String
    JSON format expected. Use jsonencode() to pass objects. Defaults to {}.
    email String
    expires String
    expiring Boolean
    Defaults to false.
    isActive Boolean
    Defaults to true.
    name String
    Defaults to ``.
    parent Number
    PK of the user that owns this agent. If not set, a new parent user is created automatically. Generated.
    policyBehavior String
    Allowed values:

    • mirror
    • copy
    • none Mirroring/copying requires an explicit parent; without one the server falls back to none. Generated.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Token string
    The agent's API token. Only returned once, at creation. Generated.
    TokenIdentifier string
    Identifier of the agent's API token, so its key can be retrieved/copied later. Generated.
    Uid string
    Generated.
    Uuid string
    Generated.
    Id string
    The provider-assigned unique ID for this managed resource.
    Token string
    The agent's API token. Only returned once, at creation. Generated.
    TokenIdentifier string
    Identifier of the agent's API token, so its key can be retrieved/copied later. Generated.
    Uid string
    Generated.
    Uuid string
    Generated.
    id string
    The provider-assigned unique ID for this managed resource.
    token string
    The agent's API token. Only returned once, at creation. Generated.
    token_identifier string
    Identifier of the agent's API token, so its key can be retrieved/copied later. Generated.
    uid string
    Generated.
    uuid string
    Generated.
    id String
    The provider-assigned unique ID for this managed resource.
    token String
    The agent's API token. Only returned once, at creation. Generated.
    tokenIdentifier String
    Identifier of the agent's API token, so its key can be retrieved/copied later. Generated.
    uid String
    Generated.
    uuid String
    Generated.
    id string
    The provider-assigned unique ID for this managed resource.
    token string
    The agent's API token. Only returned once, at creation. Generated.
    tokenIdentifier string
    Identifier of the agent's API token, so its key can be retrieved/copied later. Generated.
    uid string
    Generated.
    uuid string
    Generated.
    id str
    The provider-assigned unique ID for this managed resource.
    token str
    The agent's API token. Only returned once, at creation. Generated.
    token_identifier str
    Identifier of the agent's API token, so its key can be retrieved/copied later. Generated.
    uid str
    Generated.
    uuid str
    Generated.
    id String
    The provider-assigned unique ID for this managed resource.
    token String
    The agent's API token. Only returned once, at creation. Generated.
    tokenIdentifier String
    Identifier of the agent's API token, so its key can be retrieved/copied later. Generated.
    uid String
    Generated.
    uuid String
    Generated.

    Look up Existing Agent Resource

    Get an existing Agent 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?: AgentState, opts?: CustomResourceOptions): Agent
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            agent_id: Optional[str] = None,
            attributes: Optional[str] = None,
            email: Optional[str] = None,
            expires: Optional[str] = None,
            expiring: Optional[bool] = None,
            is_active: Optional[bool] = None,
            name: Optional[str] = None,
            parent: Optional[float] = None,
            policy_behavior: Optional[str] = None,
            token: Optional[str] = None,
            token_identifier: Optional[str] = None,
            uid: Optional[str] = None,
            username: Optional[str] = None,
            uuid: Optional[str] = None) -> Agent
    func GetAgent(ctx *Context, name string, id IDInput, state *AgentState, opts ...ResourceOption) (*Agent, error)
    public static Agent Get(string name, Input<string> id, AgentState? state, CustomResourceOptions? opts = null)
    public static Agent get(String name, Output<String> id, AgentState state, CustomResourceOptions options)
    resources:  _:    type: authentik:Agent    get:      id: ${id}
    import {
      to = authentik_agent.example
      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:
    AgentId string
    Attributes string
    JSON format expected. Use jsonencode() to pass objects. Defaults to {}.
    Email string
    Expires string
    Expiring bool
    Defaults to false.
    IsActive bool
    Defaults to true.
    Name string
    Defaults to ``.
    Parent double
    PK of the user that owns this agent. If not set, a new parent user is created automatically. Generated.
    PolicyBehavior string
    Allowed values:

    • mirror
    • copy
    • none Mirroring/copying requires an explicit parent; without one the server falls back to none. Generated.
    Token string
    The agent's API token. Only returned once, at creation. Generated.
    TokenIdentifier string
    Identifier of the agent's API token, so its key can be retrieved/copied later. Generated.
    Uid string
    Generated.
    Username string
    Uuid string
    Generated.
    AgentId string
    Attributes string
    JSON format expected. Use jsonencode() to pass objects. Defaults to {}.
    Email string
    Expires string
    Expiring bool
    Defaults to false.
    IsActive bool
    Defaults to true.
    Name string
    Defaults to ``.
    Parent float64
    PK of the user that owns this agent. If not set, a new parent user is created automatically. Generated.
    PolicyBehavior string
    Allowed values:

    • mirror
    • copy
    • none Mirroring/copying requires an explicit parent; without one the server falls back to none. Generated.
    Token string
    The agent's API token. Only returned once, at creation. Generated.
    TokenIdentifier string
    Identifier of the agent's API token, so its key can be retrieved/copied later. Generated.
    Uid string
    Generated.
    Username string
    Uuid string
    Generated.
    agent_id string
    attributes string
    JSON format expected. Use jsonencode() to pass objects. Defaults to {}.
    email string
    expires string
    expiring bool
    Defaults to false.
    is_active bool
    Defaults to true.
    name string
    Defaults to ``.
    parent number
    PK of the user that owns this agent. If not set, a new parent user is created automatically. Generated.
    policy_behavior string
    Allowed values:

    • mirror
    • copy
    • none Mirroring/copying requires an explicit parent; without one the server falls back to none. Generated.
    token string
    The agent's API token. Only returned once, at creation. Generated.
    token_identifier string
    Identifier of the agent's API token, so its key can be retrieved/copied later. Generated.
    uid string
    Generated.
    username string
    uuid string
    Generated.
    agentId String
    attributes String
    JSON format expected. Use jsonencode() to pass objects. Defaults to {}.
    email String
    expires String
    expiring Boolean
    Defaults to false.
    isActive Boolean
    Defaults to true.
    name String
    Defaults to ``.
    parent Double
    PK of the user that owns this agent. If not set, a new parent user is created automatically. Generated.
    policyBehavior String
    Allowed values:

    • mirror
    • copy
    • none Mirroring/copying requires an explicit parent; without one the server falls back to none. Generated.
    token String
    The agent's API token. Only returned once, at creation. Generated.
    tokenIdentifier String
    Identifier of the agent's API token, so its key can be retrieved/copied later. Generated.
    uid String
    Generated.
    username String
    uuid String
    Generated.
    agentId string
    attributes string
    JSON format expected. Use jsonencode() to pass objects. Defaults to {}.
    email string
    expires string
    expiring boolean
    Defaults to false.
    isActive boolean
    Defaults to true.
    name string
    Defaults to ``.
    parent number
    PK of the user that owns this agent. If not set, a new parent user is created automatically. Generated.
    policyBehavior string
    Allowed values:

    • mirror
    • copy
    • none Mirroring/copying requires an explicit parent; without one the server falls back to none. Generated.
    token string
    The agent's API token. Only returned once, at creation. Generated.
    tokenIdentifier string
    Identifier of the agent's API token, so its key can be retrieved/copied later. Generated.
    uid string
    Generated.
    username string
    uuid string
    Generated.
    agent_id str
    attributes str
    JSON format expected. Use jsonencode() to pass objects. Defaults to {}.
    email str
    expires str
    expiring bool
    Defaults to false.
    is_active bool
    Defaults to true.
    name str
    Defaults to ``.
    parent float
    PK of the user that owns this agent. If not set, a new parent user is created automatically. Generated.
    policy_behavior str
    Allowed values:

    • mirror
    • copy
    • none Mirroring/copying requires an explicit parent; without one the server falls back to none. Generated.
    token str
    The agent's API token. Only returned once, at creation. Generated.
    token_identifier str
    Identifier of the agent's API token, so its key can be retrieved/copied later. Generated.
    uid str
    Generated.
    username str
    uuid str
    Generated.
    agentId String
    attributes String
    JSON format expected. Use jsonencode() to pass objects. Defaults to {}.
    email String
    expires String
    expiring Boolean
    Defaults to false.
    isActive Boolean
    Defaults to true.
    name String
    Defaults to ``.
    parent Number
    PK of the user that owns this agent. If not set, a new parent user is created automatically. Generated.
    policyBehavior String
    Allowed values:

    • mirror
    • copy
    • none Mirroring/copying requires an explicit parent; without one the server falls back to none. Generated.
    token String
    The agent's API token. Only returned once, at creation. Generated.
    tokenIdentifier String
    Identifier of the agent's API token, so its key can be retrieved/copied later. Generated.
    uid String
    Generated.
    username String
    uuid String
    Generated.

    Package Details

    Repository
    authentik goauthentik/terraform-provider-authentik
    License
    Notes
    This Pulumi package is based on the authentik Terraform Provider.
    Viewing docs for authentik 2026.8.0
    published on Wednesday, Sep 9, 2026 by goauthentik

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial