1. Packages
  2. Coder Provider
  3. API Docs
  4. Agent
coder 2.4.0-pre1 published on Tuesday, Apr 15, 2025 by coder

coder.Agent

Explore with Pulumi AI

coder logo
coder 2.4.0-pre1 published on Tuesday, Apr 15, 2025 by coder

    Use this resource to associate an agent.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as coder from "@pulumi/coder";
    import * as kubernetes from "@pulumi/kubernetes";
    
    export = async () => {
        const me = await coder.getWorkspace({});
        const devAgent = new coder.Agent("devAgent", {
            os: "linux",
            arch: "amd64",
            dir: "/workspace",
            displayApps: {
                vscode: true,
                vscodeInsiders: false,
                webTerminal: true,
                sshHelper: false,
            },
            metadatas: [
                {
                    displayName: "CPU Usage",
                    key: "cpu_usage",
                    script: "coder stat cpu",
                    interval: 10,
                    timeout: 1,
                    order: 2,
                },
                {
                    displayName: "RAM Usage",
                    key: "ram_usage",
                    script: "coder stat mem",
                    interval: 10,
                    timeout: 1,
                    order: 1,
                },
            ],
            order: 1,
        });
        const devkubernetes_pod: kubernetes.index.Kubernetes_pod[] = [];
        for (const range = {value: 0}; range.value < me.startCount; range.value++) {
            devkubernetes_pod.push(new kubernetes.index.Kubernetes_pod(`devkubernetes_pod-${range.value}`, {spec: [{
                container: [{
                    command: [
                        "sh",
                        "-c",
                        devAgent.initScript,
                    ],
                    env: [{
                        name: "CODER_AGENT_TOKEN",
                        value: devAgent.token,
                    }],
                }],
            }]}));
        }
    }
    
    import pulumi
    import pulumi_coder as coder
    import pulumi_kubernetes as kubernetes
    
    me = coder.get_workspace()
    dev_agent = coder.Agent("devAgent",
        os="linux",
        arch="amd64",
        dir="/workspace",
        display_apps={
            "vscode": True,
            "vscode_insiders": False,
            "web_terminal": True,
            "ssh_helper": False,
        },
        metadatas=[
            {
                "display_name": "CPU Usage",
                "key": "cpu_usage",
                "script": "coder stat cpu",
                "interval": 10,
                "timeout": 1,
                "order": 2,
            },
            {
                "display_name": "RAM Usage",
                "key": "ram_usage",
                "script": "coder stat mem",
                "interval": 10,
                "timeout": 1,
                "order": 1,
            },
        ],
        order=1)
    devkubernetes_pod = []
    for range in [{"value": i} for i in range(0, me.start_count)]:
        devkubernetes_pod.append(kubernetes.index.Kubernetes_pod(f"devkubernetes_pod-{range['value']}", spec=[{
            container: [{
                command: [
                    sh,
                    -c,
                    dev_agent.init_script,
                ],
                env: [{
                    name: CODER_AGENT_TOKEN,
                    value: dev_agent.token,
                }],
            }],
        }]))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-kubernetes/sdk/go/kubernetes"
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/coder/v2/coder"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		me, err := coder.GetWorkspace(ctx, map[string]interface{}{}, nil)
    		if err != nil {
    			return err
    		}
    		devAgent, err := coder.NewAgent(ctx, "devAgent", &coder.AgentArgs{
    			Os:   pulumi.String("linux"),
    			Arch: pulumi.String("amd64"),
    			Dir:  pulumi.String("/workspace"),
    			DisplayApps: &coder.AgentDisplayAppsArgs{
    				Vscode:         pulumi.Bool(true),
    				VscodeInsiders: pulumi.Bool(false),
    				WebTerminal:    pulumi.Bool(true),
    				SshHelper:      pulumi.Bool(false),
    			},
    			Metadatas: coder.AgentMetadataArray{
    				&coder.AgentMetadataArgs{
    					DisplayName: pulumi.String("CPU Usage"),
    					Key:         pulumi.String("cpu_usage"),
    					Script:      pulumi.String("coder stat cpu"),
    					Interval:    pulumi.Float64(10),
    					Timeout:     pulumi.Float64(1),
    					Order:       pulumi.Float64(2),
    				},
    				&coder.AgentMetadataArgs{
    					DisplayName: pulumi.String("RAM Usage"),
    					Key:         pulumi.String("ram_usage"),
    					Script:      pulumi.String("coder stat mem"),
    					Interval:    pulumi.Float64(10),
    					Timeout:     pulumi.Float64(1),
    					Order:       pulumi.Float64(1),
    				},
    			},
    			Order: pulumi.Float64(1),
    		})
    		if err != nil {
    			return err
    		}
    		var devkubernetes_pod []*kubernetes.Kubernetes_pod
    		for index := 0; index < me.StartCount; index++ {
    			key0 := index
    			_ := index
    			__res, err := kubernetes.NewKubernetes_pod(ctx, fmt.Sprintf("devkubernetes_pod-%v", key0), &kubernetes.Kubernetes_podArgs{
    				Spec: []map[string]interface{}{
    					map[string]interface{}{
    						"container": []map[string]interface{}{
    							map[string]interface{}{
    								"command": []interface{}{
    									"sh",
    									"-c",
    									devAgent.InitScript,
    								},
    								"env": []map[string]interface{}{
    									map[string]interface{}{
    										"name":  "CODER_AGENT_TOKEN",
    										"value": devAgent.Token,
    									},
    								},
    							},
    						},
    					},
    				},
    			})
    			if err != nil {
    				return err
    			}
    			devkubernetes_pod = append(devkubernetes_pod, __res)
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using System.Threading.Tasks;
    using Pulumi;
    using Coder = Pulumi.Coder;
    using Kubernetes = Pulumi.Kubernetes;
    
    return await Deployment.RunAsync(async() => 
    {
        var me = await Coder.GetWorkspace.InvokeAsync();
    
        var devAgent = new Coder.Agent("devAgent", new()
        {
            Os = "linux",
            Arch = "amd64",
            Dir = "/workspace",
            DisplayApps = new Coder.Inputs.AgentDisplayAppsArgs
            {
                Vscode = true,
                VscodeInsiders = false,
                WebTerminal = true,
                SshHelper = false,
            },
            Metadatas = new[]
            {
                new Coder.Inputs.AgentMetadataArgs
                {
                    DisplayName = "CPU Usage",
                    Key = "cpu_usage",
                    Script = "coder stat cpu",
                    Interval = 10,
                    Timeout = 1,
                    Order = 2,
                },
                new Coder.Inputs.AgentMetadataArgs
                {
                    DisplayName = "RAM Usage",
                    Key = "ram_usage",
                    Script = "coder stat mem",
                    Interval = 10,
                    Timeout = 1,
                    Order = 1,
                },
            },
            Order = 1,
        });
    
        var devkubernetes_pod = new List<Kubernetes.Index.Kubernetes_pod>();
        for (var rangeIndex = 0; rangeIndex < me.StartCount; rangeIndex++)
        {
            var range = new { Value = rangeIndex };
            devkubernetes_pod.Add(new Kubernetes.Index.Kubernetes_pod($"devkubernetes_pod-{range.Value}", new()
            {
                Spec = new[]
                {
                    
                    {
                        { "container", new[]
                        {
                            
                            {
                                { "command", new[]
                                {
                                    "sh",
                                    "-c",
                                    devAgent.InitScript,
                                } },
                                { "env", new[]
                                {
                                    
                                    {
                                        { "name", "CODER_AGENT_TOKEN" },
                                        { "value", devAgent.Token },
                                    },
                                } },
                            },
                        } },
                    },
                },
            }));
        }
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.coder.CoderFunctions;
    import com.pulumi.coder.Agent;
    import com.pulumi.coder.AgentArgs;
    import com.pulumi.coder.inputs.AgentDisplayAppsArgs;
    import com.pulumi.coder.inputs.AgentMetadataArgs;
    import com.pulumi.kubernetes.kubernetes_pod;
    import com.pulumi.kubernetes.Kubernetes_podArgs;
    import com.pulumi.codegen.internal.KeyedValue;
    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) {
            final var me = CoderFunctions.getWorkspace();
    
            var devAgent = new Agent("devAgent", AgentArgs.builder()
                .os("linux")
                .arch("amd64")
                .dir("/workspace")
                .displayApps(AgentDisplayAppsArgs.builder()
                    .vscode(true)
                    .vscodeInsiders(false)
                    .webTerminal(true)
                    .sshHelper(false)
                    .build())
                .metadatas(            
                    AgentMetadataArgs.builder()
                        .displayName("CPU Usage")
                        .key("cpu_usage")
                        .script("coder stat cpu")
                        .interval(10)
                        .timeout(1)
                        .order(2)
                        .build(),
                    AgentMetadataArgs.builder()
                        .displayName("RAM Usage")
                        .key("ram_usage")
                        .script("coder stat mem")
                        .interval(10)
                        .timeout(1)
                        .order(1)
                        .build())
                .order(1)
                .build());
    
            for (var i = 0; i < me.applyValue(getWorkspaceResult -> getWorkspaceResult.startCount()); i++) {
                new Kubernetes_pod("devkubernetes_pod-" + i, Kubernetes_podArgs.builder()
                    .spec(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
                    .build());
    
            
    }
        }
    }
    
    resources:
      devAgent:
        type: coder:Agent
        properties:
          os: linux
          arch: amd64
          dir: /workspace
          displayApps:
            vscode: true
            vscodeInsiders: false
            webTerminal: true
            sshHelper: false
          metadatas:
            - displayName: CPU Usage
              key: cpu_usage
              script: coder stat cpu
              interval: 10
              timeout: 1
              order: 2
            - displayName: RAM Usage
              key: ram_usage
              script: coder stat mem
              interval: 10
              timeout: 1
              order: 1
          order: 1
      devkubernetes_pod:
        type: kubernetes:kubernetes_pod
        properties:
          spec:
            - container:
                - command:
                    - sh
                    - -c
                    - ${devAgent.initScript}
                  env:
                    - name: CODER_AGENT_TOKEN
                      value: ${devAgent.token}
        options: {}
    variables:
      me:
        fn::invoke:
          function: coder:getWorkspace
          arguments: {}
    

    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,
              os: Optional[str] = None,
              arch: Optional[str] = None,
              motd_file: Optional[str] = None,
              order: Optional[float] = None,
              dir: Optional[str] = None,
              display_apps: Optional[AgentDisplayAppsArgs] = None,
              env: Optional[Mapping[str, str]] = None,
              metadatas: Optional[Sequence[AgentMetadataArgs]] = None,
              agent_id: Optional[str] = None,
              connection_timeout: Optional[float] = None,
              auth: Optional[str] = None,
              resources_monitoring: Optional[AgentResourcesMonitoringArgs] = None,
              shutdown_script: Optional[str] = None,
              startup_script: Optional[str] = None,
              startup_script_behavior: Optional[str] = None,
              troubleshooting_url: 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: coder:Agent
    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 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 Coder.Agent("agentResource", new()
    {
        Os = "string",
        Arch = "string",
        MotdFile = "string",
        Order = 0,
        Dir = "string",
        DisplayApps = new Coder.Inputs.AgentDisplayAppsArgs
        {
            PortForwardingHelper = false,
            SshHelper = false,
            Vscode = false,
            VscodeInsiders = false,
            WebTerminal = false,
        },
        Env = 
        {
            { "string", "string" },
        },
        Metadatas = new[]
        {
            new Coder.Inputs.AgentMetadataArgs
            {
                Interval = 0,
                Key = "string",
                Script = "string",
                DisplayName = "string",
                Order = 0,
                Timeout = 0,
            },
        },
        AgentId = "string",
        ConnectionTimeout = 0,
        Auth = "string",
        ResourcesMonitoring = new Coder.Inputs.AgentResourcesMonitoringArgs
        {
            Memory = new Coder.Inputs.AgentResourcesMonitoringMemoryArgs
            {
                Enabled = false,
                Threshold = 0,
            },
            Volumes = new[]
            {
                new Coder.Inputs.AgentResourcesMonitoringVolumeArgs
                {
                    Enabled = false,
                    Path = "string",
                    Threshold = 0,
                },
            },
        },
        ShutdownScript = "string",
        StartupScript = "string",
        StartupScriptBehavior = "string",
        TroubleshootingUrl = "string",
    });
    
    example, err := coder.NewAgent(ctx, "agentResource", &coder.AgentArgs{
    	Os:       pulumi.String("string"),
    	Arch:     pulumi.String("string"),
    	MotdFile: pulumi.String("string"),
    	Order:    pulumi.Float64(0),
    	Dir:      pulumi.String("string"),
    	DisplayApps: &coder.AgentDisplayAppsArgs{
    		PortForwardingHelper: pulumi.Bool(false),
    		SshHelper:            pulumi.Bool(false),
    		Vscode:               pulumi.Bool(false),
    		VscodeInsiders:       pulumi.Bool(false),
    		WebTerminal:          pulumi.Bool(false),
    	},
    	Env: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Metadatas: coder.AgentMetadataArray{
    		&coder.AgentMetadataArgs{
    			Interval:    pulumi.Float64(0),
    			Key:         pulumi.String("string"),
    			Script:      pulumi.String("string"),
    			DisplayName: pulumi.String("string"),
    			Order:       pulumi.Float64(0),
    			Timeout:     pulumi.Float64(0),
    		},
    	},
    	AgentId:           pulumi.String("string"),
    	ConnectionTimeout: pulumi.Float64(0),
    	Auth:              pulumi.String("string"),
    	ResourcesMonitoring: &coder.AgentResourcesMonitoringArgs{
    		Memory: &coder.AgentResourcesMonitoringMemoryArgs{
    			Enabled:   pulumi.Bool(false),
    			Threshold: pulumi.Float64(0),
    		},
    		Volumes: coder.AgentResourcesMonitoringVolumeArray{
    			&coder.AgentResourcesMonitoringVolumeArgs{
    				Enabled:   pulumi.Bool(false),
    				Path:      pulumi.String("string"),
    				Threshold: pulumi.Float64(0),
    			},
    		},
    	},
    	ShutdownScript:        pulumi.String("string"),
    	StartupScript:         pulumi.String("string"),
    	StartupScriptBehavior: pulumi.String("string"),
    	TroubleshootingUrl:    pulumi.String("string"),
    })
    
    var agentResource = new Agent("agentResource", AgentArgs.builder()
        .os("string")
        .arch("string")
        .motdFile("string")
        .order(0)
        .dir("string")
        .displayApps(AgentDisplayAppsArgs.builder()
            .portForwardingHelper(false)
            .sshHelper(false)
            .vscode(false)
            .vscodeInsiders(false)
            .webTerminal(false)
            .build())
        .env(Map.of("string", "string"))
        .metadatas(AgentMetadataArgs.builder()
            .interval(0)
            .key("string")
            .script("string")
            .displayName("string")
            .order(0)
            .timeout(0)
            .build())
        .agentId("string")
        .connectionTimeout(0)
        .auth("string")
        .resourcesMonitoring(AgentResourcesMonitoringArgs.builder()
            .memory(AgentResourcesMonitoringMemoryArgs.builder()
                .enabled(false)
                .threshold(0)
                .build())
            .volumes(AgentResourcesMonitoringVolumeArgs.builder()
                .enabled(false)
                .path("string")
                .threshold(0)
                .build())
            .build())
        .shutdownScript("string")
        .startupScript("string")
        .startupScriptBehavior("string")
        .troubleshootingUrl("string")
        .build());
    
    agent_resource = coder.Agent("agentResource",
        os="string",
        arch="string",
        motd_file="string",
        order=0,
        dir="string",
        display_apps={
            "port_forwarding_helper": False,
            "ssh_helper": False,
            "vscode": False,
            "vscode_insiders": False,
            "web_terminal": False,
        },
        env={
            "string": "string",
        },
        metadatas=[{
            "interval": 0,
            "key": "string",
            "script": "string",
            "display_name": "string",
            "order": 0,
            "timeout": 0,
        }],
        agent_id="string",
        connection_timeout=0,
        auth="string",
        resources_monitoring={
            "memory": {
                "enabled": False,
                "threshold": 0,
            },
            "volumes": [{
                "enabled": False,
                "path": "string",
                "threshold": 0,
            }],
        },
        shutdown_script="string",
        startup_script="string",
        startup_script_behavior="string",
        troubleshooting_url="string")
    
    const agentResource = new coder.Agent("agentResource", {
        os: "string",
        arch: "string",
        motdFile: "string",
        order: 0,
        dir: "string",
        displayApps: {
            portForwardingHelper: false,
            sshHelper: false,
            vscode: false,
            vscodeInsiders: false,
            webTerminal: false,
        },
        env: {
            string: "string",
        },
        metadatas: [{
            interval: 0,
            key: "string",
            script: "string",
            displayName: "string",
            order: 0,
            timeout: 0,
        }],
        agentId: "string",
        connectionTimeout: 0,
        auth: "string",
        resourcesMonitoring: {
            memory: {
                enabled: false,
                threshold: 0,
            },
            volumes: [{
                enabled: false,
                path: "string",
                threshold: 0,
            }],
        },
        shutdownScript: "string",
        startupScript: "string",
        startupScriptBehavior: "string",
        troubleshootingUrl: "string",
    });
    
    type: coder:Agent
    properties:
        agentId: string
        arch: string
        auth: string
        connectionTimeout: 0
        dir: string
        displayApps:
            portForwardingHelper: false
            sshHelper: false
            vscode: false
            vscodeInsiders: false
            webTerminal: false
        env:
            string: string
        metadatas:
            - displayName: string
              interval: 0
              key: string
              order: 0
              script: string
              timeout: 0
        motdFile: string
        order: 0
        os: string
        resourcesMonitoring:
            memory:
                enabled: false
                threshold: 0
            volumes:
                - enabled: false
                  path: string
                  threshold: 0
        shutdownScript: string
        startupScript: string
        startupScriptBehavior: string
        troubleshootingUrl: 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:

    Arch string
    The architecture the agent will run on. Must be one of: "amd64", "armv7", "arm64".
    Os string
    The operating system the agent will run on. Must be one of: "linux", "darwin", or "windows".
    AgentId string
    The ID of this resource.
    Auth string
    The authentication type the agent will use. Must be one of: "token", "google-instance-identity", "aws-instance-identity", "azure-instance-identity".
    ConnectionTimeout double
    Time in seconds until the agent is marked as timed out when a connection with the server cannot be established. A value of zero never marks the agent as timed out.
    Dir string
    The starting directory when a user creates a shell session. Defaults to "$HOME".
    DisplayApps AgentDisplayApps
    The list of built-in apps to display in the agent bar.
    Env Dictionary<string, string>
    A mapping of environment variables to set inside the workspace.
    Metadatas List<AgentMetadata>
    Each metadata block defines a single item consisting of a key/value pair. This feature is in alpha and may break in future releases.
    MotdFile string
    The path to a file within the workspace containing a message to display to users when they login via SSH. A typical value would be "/etc/motd".
    Order double
    The order determines the position of agents in the UI presentation. The lowest order is shown first and agents with equal order are sorted by name (ascending order).
    ResourcesMonitoring AgentResourcesMonitoring
    The resources monitoring configuration for this agent.
    ShutdownScript string
    A script to run before the agent is stopped. The script should exit when it is done to signal that the workspace can be stopped. This option is an alias for defining a coder.Script resource with run_on_stop set to true.
    StartupScript string
    A script to run after the agent starts. The script should exit when it is done to signal that the agent is ready. This option is an alias for defining a coder.Script resource with run_on_start set to true.
    StartupScriptBehavior string
    This option sets the behavior of the startup_script. When set to "blocking", the startup_script must exit before the workspace is ready. When set to "non-blocking", the startup_script may run in the background and the workspace will be ready immediately. Default is "non-blocking", although "blocking" is recommended. This option is an alias for defining a coder.Script resource with start_blocks_login set to true (blocking).
    TroubleshootingUrl string
    A URL to a document with instructions for troubleshooting problems with the agent.
    Arch string
    The architecture the agent will run on. Must be one of: "amd64", "armv7", "arm64".
    Os string
    The operating system the agent will run on. Must be one of: "linux", "darwin", or "windows".
    AgentId string
    The ID of this resource.
    Auth string
    The authentication type the agent will use. Must be one of: "token", "google-instance-identity", "aws-instance-identity", "azure-instance-identity".
    ConnectionTimeout float64
    Time in seconds until the agent is marked as timed out when a connection with the server cannot be established. A value of zero never marks the agent as timed out.
    Dir string
    The starting directory when a user creates a shell session. Defaults to "$HOME".
    DisplayApps AgentDisplayAppsArgs
    The list of built-in apps to display in the agent bar.
    Env map[string]string
    A mapping of environment variables to set inside the workspace.
    Metadatas []AgentMetadataArgs
    Each metadata block defines a single item consisting of a key/value pair. This feature is in alpha and may break in future releases.
    MotdFile string
    The path to a file within the workspace containing a message to display to users when they login via SSH. A typical value would be "/etc/motd".
    Order float64
    The order determines the position of agents in the UI presentation. The lowest order is shown first and agents with equal order are sorted by name (ascending order).
    ResourcesMonitoring AgentResourcesMonitoringArgs
    The resources monitoring configuration for this agent.
    ShutdownScript string
    A script to run before the agent is stopped. The script should exit when it is done to signal that the workspace can be stopped. This option is an alias for defining a coder.Script resource with run_on_stop set to true.
    StartupScript string
    A script to run after the agent starts. The script should exit when it is done to signal that the agent is ready. This option is an alias for defining a coder.Script resource with run_on_start set to true.
    StartupScriptBehavior string
    This option sets the behavior of the startup_script. When set to "blocking", the startup_script must exit before the workspace is ready. When set to "non-blocking", the startup_script may run in the background and the workspace will be ready immediately. Default is "non-blocking", although "blocking" is recommended. This option is an alias for defining a coder.Script resource with start_blocks_login set to true (blocking).
    TroubleshootingUrl string
    A URL to a document with instructions for troubleshooting problems with the agent.
    arch String
    The architecture the agent will run on. Must be one of: "amd64", "armv7", "arm64".
    os String
    The operating system the agent will run on. Must be one of: "linux", "darwin", or "windows".
    agentId String
    The ID of this resource.
    auth String
    The authentication type the agent will use. Must be one of: "token", "google-instance-identity", "aws-instance-identity", "azure-instance-identity".
    connectionTimeout Double
    Time in seconds until the agent is marked as timed out when a connection with the server cannot be established. A value of zero never marks the agent as timed out.
    dir String
    The starting directory when a user creates a shell session. Defaults to "$HOME".
    displayApps AgentDisplayApps
    The list of built-in apps to display in the agent bar.
    env Map<String,String>
    A mapping of environment variables to set inside the workspace.
    metadatas List<AgentMetadata>
    Each metadata block defines a single item consisting of a key/value pair. This feature is in alpha and may break in future releases.
    motdFile String
    The path to a file within the workspace containing a message to display to users when they login via SSH. A typical value would be "/etc/motd".
    order Double
    The order determines the position of agents in the UI presentation. The lowest order is shown first and agents with equal order are sorted by name (ascending order).
    resourcesMonitoring AgentResourcesMonitoring
    The resources monitoring configuration for this agent.
    shutdownScript String
    A script to run before the agent is stopped. The script should exit when it is done to signal that the workspace can be stopped. This option is an alias for defining a coder.Script resource with run_on_stop set to true.
    startupScript String
    A script to run after the agent starts. The script should exit when it is done to signal that the agent is ready. This option is an alias for defining a coder.Script resource with run_on_start set to true.
    startupScriptBehavior String
    This option sets the behavior of the startup_script. When set to "blocking", the startup_script must exit before the workspace is ready. When set to "non-blocking", the startup_script may run in the background and the workspace will be ready immediately. Default is "non-blocking", although "blocking" is recommended. This option is an alias for defining a coder.Script resource with start_blocks_login set to true (blocking).
    troubleshootingUrl String
    A URL to a document with instructions for troubleshooting problems with the agent.
    arch string
    The architecture the agent will run on. Must be one of: "amd64", "armv7", "arm64".
    os string
    The operating system the agent will run on. Must be one of: "linux", "darwin", or "windows".
    agentId string
    The ID of this resource.
    auth string
    The authentication type the agent will use. Must be one of: "token", "google-instance-identity", "aws-instance-identity", "azure-instance-identity".
    connectionTimeout number
    Time in seconds until the agent is marked as timed out when a connection with the server cannot be established. A value of zero never marks the agent as timed out.
    dir string
    The starting directory when a user creates a shell session. Defaults to "$HOME".
    displayApps AgentDisplayApps
    The list of built-in apps to display in the agent bar.
    env {[key: string]: string}
    A mapping of environment variables to set inside the workspace.
    metadatas AgentMetadata[]
    Each metadata block defines a single item consisting of a key/value pair. This feature is in alpha and may break in future releases.
    motdFile string
    The path to a file within the workspace containing a message to display to users when they login via SSH. A typical value would be "/etc/motd".
    order number
    The order determines the position of agents in the UI presentation. The lowest order is shown first and agents with equal order are sorted by name (ascending order).
    resourcesMonitoring AgentResourcesMonitoring
    The resources monitoring configuration for this agent.
    shutdownScript string
    A script to run before the agent is stopped. The script should exit when it is done to signal that the workspace can be stopped. This option is an alias for defining a coder.Script resource with run_on_stop set to true.
    startupScript string
    A script to run after the agent starts. The script should exit when it is done to signal that the agent is ready. This option is an alias for defining a coder.Script resource with run_on_start set to true.
    startupScriptBehavior string
    This option sets the behavior of the startup_script. When set to "blocking", the startup_script must exit before the workspace is ready. When set to "non-blocking", the startup_script may run in the background and the workspace will be ready immediately. Default is "non-blocking", although "blocking" is recommended. This option is an alias for defining a coder.Script resource with start_blocks_login set to true (blocking).
    troubleshootingUrl string
    A URL to a document with instructions for troubleshooting problems with the agent.
    arch str
    The architecture the agent will run on. Must be one of: "amd64", "armv7", "arm64".
    os str
    The operating system the agent will run on. Must be one of: "linux", "darwin", or "windows".
    agent_id str
    The ID of this resource.
    auth str
    The authentication type the agent will use. Must be one of: "token", "google-instance-identity", "aws-instance-identity", "azure-instance-identity".
    connection_timeout float
    Time in seconds until the agent is marked as timed out when a connection with the server cannot be established. A value of zero never marks the agent as timed out.
    dir str
    The starting directory when a user creates a shell session. Defaults to "$HOME".
    display_apps AgentDisplayAppsArgs
    The list of built-in apps to display in the agent bar.
    env Mapping[str, str]
    A mapping of environment variables to set inside the workspace.
    metadatas Sequence[AgentMetadataArgs]
    Each metadata block defines a single item consisting of a key/value pair. This feature is in alpha and may break in future releases.
    motd_file str
    The path to a file within the workspace containing a message to display to users when they login via SSH. A typical value would be "/etc/motd".
    order float
    The order determines the position of agents in the UI presentation. The lowest order is shown first and agents with equal order are sorted by name (ascending order).
    resources_monitoring AgentResourcesMonitoringArgs
    The resources monitoring configuration for this agent.
    shutdown_script str
    A script to run before the agent is stopped. The script should exit when it is done to signal that the workspace can be stopped. This option is an alias for defining a coder.Script resource with run_on_stop set to true.
    startup_script str
    A script to run after the agent starts. The script should exit when it is done to signal that the agent is ready. This option is an alias for defining a coder.Script resource with run_on_start set to true.
    startup_script_behavior str
    This option sets the behavior of the startup_script. When set to "blocking", the startup_script must exit before the workspace is ready. When set to "non-blocking", the startup_script may run in the background and the workspace will be ready immediately. Default is "non-blocking", although "blocking" is recommended. This option is an alias for defining a coder.Script resource with start_blocks_login set to true (blocking).
    troubleshooting_url str
    A URL to a document with instructions for troubleshooting problems with the agent.
    arch String
    The architecture the agent will run on. Must be one of: "amd64", "armv7", "arm64".
    os String
    The operating system the agent will run on. Must be one of: "linux", "darwin", or "windows".
    agentId String
    The ID of this resource.
    auth String
    The authentication type the agent will use. Must be one of: "token", "google-instance-identity", "aws-instance-identity", "azure-instance-identity".
    connectionTimeout Number
    Time in seconds until the agent is marked as timed out when a connection with the server cannot be established. A value of zero never marks the agent as timed out.
    dir String
    The starting directory when a user creates a shell session. Defaults to "$HOME".
    displayApps Property Map
    The list of built-in apps to display in the agent bar.
    env Map<String>
    A mapping of environment variables to set inside the workspace.
    metadatas List<Property Map>
    Each metadata block defines a single item consisting of a key/value pair. This feature is in alpha and may break in future releases.
    motdFile String
    The path to a file within the workspace containing a message to display to users when they login via SSH. A typical value would be "/etc/motd".
    order Number
    The order determines the position of agents in the UI presentation. The lowest order is shown first and agents with equal order are sorted by name (ascending order).
    resourcesMonitoring Property Map
    The resources monitoring configuration for this agent.
    shutdownScript String
    A script to run before the agent is stopped. The script should exit when it is done to signal that the workspace can be stopped. This option is an alias for defining a coder.Script resource with run_on_stop set to true.
    startupScript String
    A script to run after the agent starts. The script should exit when it is done to signal that the agent is ready. This option is an alias for defining a coder.Script resource with run_on_start set to true.
    startupScriptBehavior String
    This option sets the behavior of the startup_script. When set to "blocking", the startup_script must exit before the workspace is ready. When set to "non-blocking", the startup_script may run in the background and the workspace will be ready immediately. Default is "non-blocking", although "blocking" is recommended. This option is an alias for defining a coder.Script resource with start_blocks_login set to true (blocking).
    troubleshootingUrl String
    A URL to a document with instructions for troubleshooting problems with the agent.

    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.
    InitScript string
    Run this script on startup of an instance to initialize the agent.
    Token string
    Set the environment variable CODER_AGENT_TOKEN with this token to authenticate an agent.
    Id string
    The provider-assigned unique ID for this managed resource.
    InitScript string
    Run this script on startup of an instance to initialize the agent.
    Token string
    Set the environment variable CODER_AGENT_TOKEN with this token to authenticate an agent.
    id String
    The provider-assigned unique ID for this managed resource.
    initScript String
    Run this script on startup of an instance to initialize the agent.
    token String
    Set the environment variable CODER_AGENT_TOKEN with this token to authenticate an agent.
    id string
    The provider-assigned unique ID for this managed resource.
    initScript string
    Run this script on startup of an instance to initialize the agent.
    token string
    Set the environment variable CODER_AGENT_TOKEN with this token to authenticate an agent.
    id str
    The provider-assigned unique ID for this managed resource.
    init_script str
    Run this script on startup of an instance to initialize the agent.
    token str
    Set the environment variable CODER_AGENT_TOKEN with this token to authenticate an agent.
    id String
    The provider-assigned unique ID for this managed resource.
    initScript String
    Run this script on startup of an instance to initialize the agent.
    token String
    Set the environment variable CODER_AGENT_TOKEN with this token to authenticate an agent.

    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,
            arch: Optional[str] = None,
            auth: Optional[str] = None,
            connection_timeout: Optional[float] = None,
            dir: Optional[str] = None,
            display_apps: Optional[AgentDisplayAppsArgs] = None,
            env: Optional[Mapping[str, str]] = None,
            init_script: Optional[str] = None,
            metadatas: Optional[Sequence[AgentMetadataArgs]] = None,
            motd_file: Optional[str] = None,
            order: Optional[float] = None,
            os: Optional[str] = None,
            resources_monitoring: Optional[AgentResourcesMonitoringArgs] = None,
            shutdown_script: Optional[str] = None,
            startup_script: Optional[str] = None,
            startup_script_behavior: Optional[str] = None,
            token: Optional[str] = None,
            troubleshooting_url: 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: coder:Agent    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.
    The following state arguments are supported:
    AgentId string
    The ID of this resource.
    Arch string
    The architecture the agent will run on. Must be one of: "amd64", "armv7", "arm64".
    Auth string
    The authentication type the agent will use. Must be one of: "token", "google-instance-identity", "aws-instance-identity", "azure-instance-identity".
    ConnectionTimeout double
    Time in seconds until the agent is marked as timed out when a connection with the server cannot be established. A value of zero never marks the agent as timed out.
    Dir string
    The starting directory when a user creates a shell session. Defaults to "$HOME".
    DisplayApps AgentDisplayApps
    The list of built-in apps to display in the agent bar.
    Env Dictionary<string, string>
    A mapping of environment variables to set inside the workspace.
    InitScript string
    Run this script on startup of an instance to initialize the agent.
    Metadatas List<AgentMetadata>
    Each metadata block defines a single item consisting of a key/value pair. This feature is in alpha and may break in future releases.
    MotdFile string
    The path to a file within the workspace containing a message to display to users when they login via SSH. A typical value would be "/etc/motd".
    Order double
    The order determines the position of agents in the UI presentation. The lowest order is shown first and agents with equal order are sorted by name (ascending order).
    Os string
    The operating system the agent will run on. Must be one of: "linux", "darwin", or "windows".
    ResourcesMonitoring AgentResourcesMonitoring
    The resources monitoring configuration for this agent.
    ShutdownScript string
    A script to run before the agent is stopped. The script should exit when it is done to signal that the workspace can be stopped. This option is an alias for defining a coder.Script resource with run_on_stop set to true.
    StartupScript string
    A script to run after the agent starts. The script should exit when it is done to signal that the agent is ready. This option is an alias for defining a coder.Script resource with run_on_start set to true.
    StartupScriptBehavior string
    This option sets the behavior of the startup_script. When set to "blocking", the startup_script must exit before the workspace is ready. When set to "non-blocking", the startup_script may run in the background and the workspace will be ready immediately. Default is "non-blocking", although "blocking" is recommended. This option is an alias for defining a coder.Script resource with start_blocks_login set to true (blocking).
    Token string
    Set the environment variable CODER_AGENT_TOKEN with this token to authenticate an agent.
    TroubleshootingUrl string
    A URL to a document with instructions for troubleshooting problems with the agent.
    AgentId string
    The ID of this resource.
    Arch string
    The architecture the agent will run on. Must be one of: "amd64", "armv7", "arm64".
    Auth string
    The authentication type the agent will use. Must be one of: "token", "google-instance-identity", "aws-instance-identity", "azure-instance-identity".
    ConnectionTimeout float64
    Time in seconds until the agent is marked as timed out when a connection with the server cannot be established. A value of zero never marks the agent as timed out.
    Dir string
    The starting directory when a user creates a shell session. Defaults to "$HOME".
    DisplayApps AgentDisplayAppsArgs
    The list of built-in apps to display in the agent bar.
    Env map[string]string
    A mapping of environment variables to set inside the workspace.
    InitScript string
    Run this script on startup of an instance to initialize the agent.
    Metadatas []AgentMetadataArgs
    Each metadata block defines a single item consisting of a key/value pair. This feature is in alpha and may break in future releases.
    MotdFile string
    The path to a file within the workspace containing a message to display to users when they login via SSH. A typical value would be "/etc/motd".
    Order float64
    The order determines the position of agents in the UI presentation. The lowest order is shown first and agents with equal order are sorted by name (ascending order).
    Os string
    The operating system the agent will run on. Must be one of: "linux", "darwin", or "windows".
    ResourcesMonitoring AgentResourcesMonitoringArgs
    The resources monitoring configuration for this agent.
    ShutdownScript string
    A script to run before the agent is stopped. The script should exit when it is done to signal that the workspace can be stopped. This option is an alias for defining a coder.Script resource with run_on_stop set to true.
    StartupScript string
    A script to run after the agent starts. The script should exit when it is done to signal that the agent is ready. This option is an alias for defining a coder.Script resource with run_on_start set to true.
    StartupScriptBehavior string
    This option sets the behavior of the startup_script. When set to "blocking", the startup_script must exit before the workspace is ready. When set to "non-blocking", the startup_script may run in the background and the workspace will be ready immediately. Default is "non-blocking", although "blocking" is recommended. This option is an alias for defining a coder.Script resource with start_blocks_login set to true (blocking).
    Token string
    Set the environment variable CODER_AGENT_TOKEN with this token to authenticate an agent.
    TroubleshootingUrl string
    A URL to a document with instructions for troubleshooting problems with the agent.
    agentId String
    The ID of this resource.
    arch String
    The architecture the agent will run on. Must be one of: "amd64", "armv7", "arm64".
    auth String
    The authentication type the agent will use. Must be one of: "token", "google-instance-identity", "aws-instance-identity", "azure-instance-identity".
    connectionTimeout Double
    Time in seconds until the agent is marked as timed out when a connection with the server cannot be established. A value of zero never marks the agent as timed out.
    dir String
    The starting directory when a user creates a shell session. Defaults to "$HOME".
    displayApps AgentDisplayApps
    The list of built-in apps to display in the agent bar.
    env Map<String,String>
    A mapping of environment variables to set inside the workspace.
    initScript String
    Run this script on startup of an instance to initialize the agent.
    metadatas List<AgentMetadata>
    Each metadata block defines a single item consisting of a key/value pair. This feature is in alpha and may break in future releases.
    motdFile String
    The path to a file within the workspace containing a message to display to users when they login via SSH. A typical value would be "/etc/motd".
    order Double
    The order determines the position of agents in the UI presentation. The lowest order is shown first and agents with equal order are sorted by name (ascending order).
    os String
    The operating system the agent will run on. Must be one of: "linux", "darwin", or "windows".
    resourcesMonitoring AgentResourcesMonitoring
    The resources monitoring configuration for this agent.
    shutdownScript String
    A script to run before the agent is stopped. The script should exit when it is done to signal that the workspace can be stopped. This option is an alias for defining a coder.Script resource with run_on_stop set to true.
    startupScript String
    A script to run after the agent starts. The script should exit when it is done to signal that the agent is ready. This option is an alias for defining a coder.Script resource with run_on_start set to true.
    startupScriptBehavior String
    This option sets the behavior of the startup_script. When set to "blocking", the startup_script must exit before the workspace is ready. When set to "non-blocking", the startup_script may run in the background and the workspace will be ready immediately. Default is "non-blocking", although "blocking" is recommended. This option is an alias for defining a coder.Script resource with start_blocks_login set to true (blocking).
    token String
    Set the environment variable CODER_AGENT_TOKEN with this token to authenticate an agent.
    troubleshootingUrl String
    A URL to a document with instructions for troubleshooting problems with the agent.
    agentId string
    The ID of this resource.
    arch string
    The architecture the agent will run on. Must be one of: "amd64", "armv7", "arm64".
    auth string
    The authentication type the agent will use. Must be one of: "token", "google-instance-identity", "aws-instance-identity", "azure-instance-identity".
    connectionTimeout number
    Time in seconds until the agent is marked as timed out when a connection with the server cannot be established. A value of zero never marks the agent as timed out.
    dir string
    The starting directory when a user creates a shell session. Defaults to "$HOME".
    displayApps AgentDisplayApps
    The list of built-in apps to display in the agent bar.
    env {[key: string]: string}
    A mapping of environment variables to set inside the workspace.
    initScript string
    Run this script on startup of an instance to initialize the agent.
    metadatas AgentMetadata[]
    Each metadata block defines a single item consisting of a key/value pair. This feature is in alpha and may break in future releases.
    motdFile string
    The path to a file within the workspace containing a message to display to users when they login via SSH. A typical value would be "/etc/motd".
    order number
    The order determines the position of agents in the UI presentation. The lowest order is shown first and agents with equal order are sorted by name (ascending order).
    os string
    The operating system the agent will run on. Must be one of: "linux", "darwin", or "windows".
    resourcesMonitoring AgentResourcesMonitoring
    The resources monitoring configuration for this agent.
    shutdownScript string
    A script to run before the agent is stopped. The script should exit when it is done to signal that the workspace can be stopped. This option is an alias for defining a coder.Script resource with run_on_stop set to true.
    startupScript string
    A script to run after the agent starts. The script should exit when it is done to signal that the agent is ready. This option is an alias for defining a coder.Script resource with run_on_start set to true.
    startupScriptBehavior string
    This option sets the behavior of the startup_script. When set to "blocking", the startup_script must exit before the workspace is ready. When set to "non-blocking", the startup_script may run in the background and the workspace will be ready immediately. Default is "non-blocking", although "blocking" is recommended. This option is an alias for defining a coder.Script resource with start_blocks_login set to true (blocking).
    token string
    Set the environment variable CODER_AGENT_TOKEN with this token to authenticate an agent.
    troubleshootingUrl string
    A URL to a document with instructions for troubleshooting problems with the agent.
    agent_id str
    The ID of this resource.
    arch str
    The architecture the agent will run on. Must be one of: "amd64", "armv7", "arm64".
    auth str
    The authentication type the agent will use. Must be one of: "token", "google-instance-identity", "aws-instance-identity", "azure-instance-identity".
    connection_timeout float
    Time in seconds until the agent is marked as timed out when a connection with the server cannot be established. A value of zero never marks the agent as timed out.
    dir str
    The starting directory when a user creates a shell session. Defaults to "$HOME".
    display_apps AgentDisplayAppsArgs
    The list of built-in apps to display in the agent bar.
    env Mapping[str, str]
    A mapping of environment variables to set inside the workspace.
    init_script str
    Run this script on startup of an instance to initialize the agent.
    metadatas Sequence[AgentMetadataArgs]
    Each metadata block defines a single item consisting of a key/value pair. This feature is in alpha and may break in future releases.
    motd_file str
    The path to a file within the workspace containing a message to display to users when they login via SSH. A typical value would be "/etc/motd".
    order float
    The order determines the position of agents in the UI presentation. The lowest order is shown first and agents with equal order are sorted by name (ascending order).
    os str
    The operating system the agent will run on. Must be one of: "linux", "darwin", or "windows".
    resources_monitoring AgentResourcesMonitoringArgs
    The resources monitoring configuration for this agent.
    shutdown_script str
    A script to run before the agent is stopped. The script should exit when it is done to signal that the workspace can be stopped. This option is an alias for defining a coder.Script resource with run_on_stop set to true.
    startup_script str
    A script to run after the agent starts. The script should exit when it is done to signal that the agent is ready. This option is an alias for defining a coder.Script resource with run_on_start set to true.
    startup_script_behavior str
    This option sets the behavior of the startup_script. When set to "blocking", the startup_script must exit before the workspace is ready. When set to "non-blocking", the startup_script may run in the background and the workspace will be ready immediately. Default is "non-blocking", although "blocking" is recommended. This option is an alias for defining a coder.Script resource with start_blocks_login set to true (blocking).
    token str
    Set the environment variable CODER_AGENT_TOKEN with this token to authenticate an agent.
    troubleshooting_url str
    A URL to a document with instructions for troubleshooting problems with the agent.
    agentId String
    The ID of this resource.
    arch String
    The architecture the agent will run on. Must be one of: "amd64", "armv7", "arm64".
    auth String
    The authentication type the agent will use. Must be one of: "token", "google-instance-identity", "aws-instance-identity", "azure-instance-identity".
    connectionTimeout Number
    Time in seconds until the agent is marked as timed out when a connection with the server cannot be established. A value of zero never marks the agent as timed out.
    dir String
    The starting directory when a user creates a shell session. Defaults to "$HOME".
    displayApps Property Map
    The list of built-in apps to display in the agent bar.
    env Map<String>
    A mapping of environment variables to set inside the workspace.
    initScript String
    Run this script on startup of an instance to initialize the agent.
    metadatas List<Property Map>
    Each metadata block defines a single item consisting of a key/value pair. This feature is in alpha and may break in future releases.
    motdFile String
    The path to a file within the workspace containing a message to display to users when they login via SSH. A typical value would be "/etc/motd".
    order Number
    The order determines the position of agents in the UI presentation. The lowest order is shown first and agents with equal order are sorted by name (ascending order).
    os String
    The operating system the agent will run on. Must be one of: "linux", "darwin", or "windows".
    resourcesMonitoring Property Map
    The resources monitoring configuration for this agent.
    shutdownScript String
    A script to run before the agent is stopped. The script should exit when it is done to signal that the workspace can be stopped. This option is an alias for defining a coder.Script resource with run_on_stop set to true.
    startupScript String
    A script to run after the agent starts. The script should exit when it is done to signal that the agent is ready. This option is an alias for defining a coder.Script resource with run_on_start set to true.
    startupScriptBehavior String
    This option sets the behavior of the startup_script. When set to "blocking", the startup_script must exit before the workspace is ready. When set to "non-blocking", the startup_script may run in the background and the workspace will be ready immediately. Default is "non-blocking", although "blocking" is recommended. This option is an alias for defining a coder.Script resource with start_blocks_login set to true (blocking).
    token String
    Set the environment variable CODER_AGENT_TOKEN with this token to authenticate an agent.
    troubleshootingUrl String
    A URL to a document with instructions for troubleshooting problems with the agent.

    Supporting Types

    AgentDisplayApps, AgentDisplayAppsArgs

    PortForwardingHelper bool
    Display the port-forwarding helper button in the agent bar.
    SshHelper bool
    Display the SSH helper button in the agent bar.
    Vscode bool
    Display the VSCode Desktop app in the agent bar.
    VscodeInsiders bool
    Display the VSCode Insiders app in the agent bar.
    WebTerminal bool
    Display the web terminal app in the agent bar.
    PortForwardingHelper bool
    Display the port-forwarding helper button in the agent bar.
    SshHelper bool
    Display the SSH helper button in the agent bar.
    Vscode bool
    Display the VSCode Desktop app in the agent bar.
    VscodeInsiders bool
    Display the VSCode Insiders app in the agent bar.
    WebTerminal bool
    Display the web terminal app in the agent bar.
    portForwardingHelper Boolean
    Display the port-forwarding helper button in the agent bar.
    sshHelper Boolean
    Display the SSH helper button in the agent bar.
    vscode Boolean
    Display the VSCode Desktop app in the agent bar.
    vscodeInsiders Boolean
    Display the VSCode Insiders app in the agent bar.
    webTerminal Boolean
    Display the web terminal app in the agent bar.
    portForwardingHelper boolean
    Display the port-forwarding helper button in the agent bar.
    sshHelper boolean
    Display the SSH helper button in the agent bar.
    vscode boolean
    Display the VSCode Desktop app in the agent bar.
    vscodeInsiders boolean
    Display the VSCode Insiders app in the agent bar.
    webTerminal boolean
    Display the web terminal app in the agent bar.
    port_forwarding_helper bool
    Display the port-forwarding helper button in the agent bar.
    ssh_helper bool
    Display the SSH helper button in the agent bar.
    vscode bool
    Display the VSCode Desktop app in the agent bar.
    vscode_insiders bool
    Display the VSCode Insiders app in the agent bar.
    web_terminal bool
    Display the web terminal app in the agent bar.
    portForwardingHelper Boolean
    Display the port-forwarding helper button in the agent bar.
    sshHelper Boolean
    Display the SSH helper button in the agent bar.
    vscode Boolean
    Display the VSCode Desktop app in the agent bar.
    vscodeInsiders Boolean
    Display the VSCode Insiders app in the agent bar.
    webTerminal Boolean
    Display the web terminal app in the agent bar.

    AgentMetadata, AgentMetadataArgs

    Interval double
    The interval in seconds at which to refresh this metadata item.
    Key string
    The key of this metadata item.
    Script string
    The script that retrieves the value of this metadata item.
    DisplayName string
    The user-facing name of this value.
    Order double
    The order determines the position of agent metadata in the UI presentation. The lowest order is shown first and metadata with equal order are sorted by key (ascending order).
    Timeout double
    The maximum time the command is allowed to run in seconds.
    Interval float64
    The interval in seconds at which to refresh this metadata item.
    Key string
    The key of this metadata item.
    Script string
    The script that retrieves the value of this metadata item.
    DisplayName string
    The user-facing name of this value.
    Order float64
    The order determines the position of agent metadata in the UI presentation. The lowest order is shown first and metadata with equal order are sorted by key (ascending order).
    Timeout float64
    The maximum time the command is allowed to run in seconds.
    interval Double
    The interval in seconds at which to refresh this metadata item.
    key String
    The key of this metadata item.
    script String
    The script that retrieves the value of this metadata item.
    displayName String
    The user-facing name of this value.
    order Double
    The order determines the position of agent metadata in the UI presentation. The lowest order is shown first and metadata with equal order are sorted by key (ascending order).
    timeout Double
    The maximum time the command is allowed to run in seconds.
    interval number
    The interval in seconds at which to refresh this metadata item.
    key string
    The key of this metadata item.
    script string
    The script that retrieves the value of this metadata item.
    displayName string
    The user-facing name of this value.
    order number
    The order determines the position of agent metadata in the UI presentation. The lowest order is shown first and metadata with equal order are sorted by key (ascending order).
    timeout number
    The maximum time the command is allowed to run in seconds.
    interval float
    The interval in seconds at which to refresh this metadata item.
    key str
    The key of this metadata item.
    script str
    The script that retrieves the value of this metadata item.
    display_name str
    The user-facing name of this value.
    order float
    The order determines the position of agent metadata in the UI presentation. The lowest order is shown first and metadata with equal order are sorted by key (ascending order).
    timeout float
    The maximum time the command is allowed to run in seconds.
    interval Number
    The interval in seconds at which to refresh this metadata item.
    key String
    The key of this metadata item.
    script String
    The script that retrieves the value of this metadata item.
    displayName String
    The user-facing name of this value.
    order Number
    The order determines the position of agent metadata in the UI presentation. The lowest order is shown first and metadata with equal order are sorted by key (ascending order).
    timeout Number
    The maximum time the command is allowed to run in seconds.

    AgentResourcesMonitoring, AgentResourcesMonitoringArgs

    Memory AgentResourcesMonitoringMemory
    The memory monitoring configuration for this agent.
    Volumes List<AgentResourcesMonitoringVolume>
    The volumes monitoring configuration for this agent.
    Memory AgentResourcesMonitoringMemory
    The memory monitoring configuration for this agent.
    Volumes []AgentResourcesMonitoringVolume
    The volumes monitoring configuration for this agent.
    memory AgentResourcesMonitoringMemory
    The memory monitoring configuration for this agent.
    volumes List<AgentResourcesMonitoringVolume>
    The volumes monitoring configuration for this agent.
    memory AgentResourcesMonitoringMemory
    The memory monitoring configuration for this agent.
    volumes AgentResourcesMonitoringVolume[]
    The volumes monitoring configuration for this agent.
    memory AgentResourcesMonitoringMemory
    The memory monitoring configuration for this agent.
    volumes Sequence[AgentResourcesMonitoringVolume]
    The volumes monitoring configuration for this agent.
    memory Property Map
    The memory monitoring configuration for this agent.
    volumes List<Property Map>
    The volumes monitoring configuration for this agent.

    AgentResourcesMonitoringMemory, AgentResourcesMonitoringMemoryArgs

    Enabled bool
    Enable memory monitoring for this agent.
    Threshold double
    The memory usage threshold in percentage at which to trigger an alert. Value should be between 0 and 100.
    Enabled bool
    Enable memory monitoring for this agent.
    Threshold float64
    The memory usage threshold in percentage at which to trigger an alert. Value should be between 0 and 100.
    enabled Boolean
    Enable memory monitoring for this agent.
    threshold Double
    The memory usage threshold in percentage at which to trigger an alert. Value should be between 0 and 100.
    enabled boolean
    Enable memory monitoring for this agent.
    threshold number
    The memory usage threshold in percentage at which to trigger an alert. Value should be between 0 and 100.
    enabled bool
    Enable memory monitoring for this agent.
    threshold float
    The memory usage threshold in percentage at which to trigger an alert. Value should be between 0 and 100.
    enabled Boolean
    Enable memory monitoring for this agent.
    threshold Number
    The memory usage threshold in percentage at which to trigger an alert. Value should be between 0 and 100.

    AgentResourcesMonitoringVolume, AgentResourcesMonitoringVolumeArgs

    Enabled bool
    Enable volume monitoring for this agent.
    Path string
    The path of the volume to monitor.
    Threshold double
    The volume usage threshold in percentage at which to trigger an alert. Value should be between 0 and 100.
    Enabled bool
    Enable volume monitoring for this agent.
    Path string
    The path of the volume to monitor.
    Threshold float64
    The volume usage threshold in percentage at which to trigger an alert. Value should be between 0 and 100.
    enabled Boolean
    Enable volume monitoring for this agent.
    path String
    The path of the volume to monitor.
    threshold Double
    The volume usage threshold in percentage at which to trigger an alert. Value should be between 0 and 100.
    enabled boolean
    Enable volume monitoring for this agent.
    path string
    The path of the volume to monitor.
    threshold number
    The volume usage threshold in percentage at which to trigger an alert. Value should be between 0 and 100.
    enabled bool
    Enable volume monitoring for this agent.
    path str
    The path of the volume to monitor.
    threshold float
    The volume usage threshold in percentage at which to trigger an alert. Value should be between 0 and 100.
    enabled Boolean
    Enable volume monitoring for this agent.
    path String
    The path of the volume to monitor.
    threshold Number
    The volume usage threshold in percentage at which to trigger an alert. Value should be between 0 and 100.

    Package Details

    Repository
    coder coder/terraform-provider-coder
    License
    Notes
    This Pulumi package is based on the coder Terraform Provider.
    coder logo
    coder 2.4.0-pre1 published on Tuesday, Apr 15, 2025 by coder