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

coder.Devcontainer

Explore with Pulumi AI

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

    Define a Dev Container the agent should know of and attempt to autostart (minimum Coder version: v2.21).

    Create Devcontainer Resource

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

    Constructor syntax

    new Devcontainer(name: string, args: DevcontainerArgs, opts?: CustomResourceOptions);
    @overload
    def Devcontainer(resource_name: str,
                     args: DevcontainerArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def Devcontainer(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     agent_id: Optional[str] = None,
                     workspace_folder: Optional[str] = None,
                     config_path: Optional[str] = None,
                     devcontainer_id: Optional[str] = None)
    func NewDevcontainer(ctx *Context, name string, args DevcontainerArgs, opts ...ResourceOption) (*Devcontainer, error)
    public Devcontainer(string name, DevcontainerArgs args, CustomResourceOptions? opts = null)
    public Devcontainer(String name, DevcontainerArgs args)
    public Devcontainer(String name, DevcontainerArgs args, CustomResourceOptions options)
    
    type: coder:Devcontainer
    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 DevcontainerArgs
    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 DevcontainerArgs
    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 DevcontainerArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DevcontainerArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DevcontainerArgs
    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 devcontainerResource = new Coder.Devcontainer("devcontainerResource", new()
    {
        AgentId = "string",
        WorkspaceFolder = "string",
        ConfigPath = "string",
        DevcontainerId = "string",
    });
    
    example, err := coder.NewDevcontainer(ctx, "devcontainerResource", &coder.DevcontainerArgs{
    	AgentId:         pulumi.String("string"),
    	WorkspaceFolder: pulumi.String("string"),
    	ConfigPath:      pulumi.String("string"),
    	DevcontainerId:  pulumi.String("string"),
    })
    
    var devcontainerResource = new Devcontainer("devcontainerResource", DevcontainerArgs.builder()
        .agentId("string")
        .workspaceFolder("string")
        .configPath("string")
        .devcontainerId("string")
        .build());
    
    devcontainer_resource = coder.Devcontainer("devcontainerResource",
        agent_id="string",
        workspace_folder="string",
        config_path="string",
        devcontainer_id="string")
    
    const devcontainerResource = new coder.Devcontainer("devcontainerResource", {
        agentId: "string",
        workspaceFolder: "string",
        configPath: "string",
        devcontainerId: "string",
    });
    
    type: coder:Devcontainer
    properties:
        agentId: string
        configPath: string
        devcontainerId: string
        workspaceFolder: string
    

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

    AgentId string
    The id property of a coder.Agent resource to associate with.
    WorkspaceFolder string
    The workspace folder to for the Dev Container.
    ConfigPath string
    The path to the Dev Container configuration file (devcontainer.json).
    DevcontainerId string
    The ID of this resource.
    AgentId string
    The id property of a coder.Agent resource to associate with.
    WorkspaceFolder string
    The workspace folder to for the Dev Container.
    ConfigPath string
    The path to the Dev Container configuration file (devcontainer.json).
    DevcontainerId string
    The ID of this resource.
    agentId String
    The id property of a coder.Agent resource to associate with.
    workspaceFolder String
    The workspace folder to for the Dev Container.
    configPath String
    The path to the Dev Container configuration file (devcontainer.json).
    devcontainerId String
    The ID of this resource.
    agentId string
    The id property of a coder.Agent resource to associate with.
    workspaceFolder string
    The workspace folder to for the Dev Container.
    configPath string
    The path to the Dev Container configuration file (devcontainer.json).
    devcontainerId string
    The ID of this resource.
    agent_id str
    The id property of a coder.Agent resource to associate with.
    workspace_folder str
    The workspace folder to for the Dev Container.
    config_path str
    The path to the Dev Container configuration file (devcontainer.json).
    devcontainer_id str
    The ID of this resource.
    agentId String
    The id property of a coder.Agent resource to associate with.
    workspaceFolder String
    The workspace folder to for the Dev Container.
    configPath String
    The path to the Dev Container configuration file (devcontainer.json).
    devcontainerId String
    The ID of this resource.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Devcontainer Resource

    Get an existing Devcontainer 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?: DevcontainerState, opts?: CustomResourceOptions): Devcontainer
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            agent_id: Optional[str] = None,
            config_path: Optional[str] = None,
            devcontainer_id: Optional[str] = None,
            workspace_folder: Optional[str] = None) -> Devcontainer
    func GetDevcontainer(ctx *Context, name string, id IDInput, state *DevcontainerState, opts ...ResourceOption) (*Devcontainer, error)
    public static Devcontainer Get(string name, Input<string> id, DevcontainerState? state, CustomResourceOptions? opts = null)
    public static Devcontainer get(String name, Output<String> id, DevcontainerState state, CustomResourceOptions options)
    resources:  _:    type: coder:Devcontainer    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 property of a coder.Agent resource to associate with.
    ConfigPath string
    The path to the Dev Container configuration file (devcontainer.json).
    DevcontainerId string
    The ID of this resource.
    WorkspaceFolder string
    The workspace folder to for the Dev Container.
    AgentId string
    The id property of a coder.Agent resource to associate with.
    ConfigPath string
    The path to the Dev Container configuration file (devcontainer.json).
    DevcontainerId string
    The ID of this resource.
    WorkspaceFolder string
    The workspace folder to for the Dev Container.
    agentId String
    The id property of a coder.Agent resource to associate with.
    configPath String
    The path to the Dev Container configuration file (devcontainer.json).
    devcontainerId String
    The ID of this resource.
    workspaceFolder String
    The workspace folder to for the Dev Container.
    agentId string
    The id property of a coder.Agent resource to associate with.
    configPath string
    The path to the Dev Container configuration file (devcontainer.json).
    devcontainerId string
    The ID of this resource.
    workspaceFolder string
    The workspace folder to for the Dev Container.
    agent_id str
    The id property of a coder.Agent resource to associate with.
    config_path str
    The path to the Dev Container configuration file (devcontainer.json).
    devcontainer_id str
    The ID of this resource.
    workspace_folder str
    The workspace folder to for the Dev Container.
    agentId String
    The id property of a coder.Agent resource to associate with.
    configPath String
    The path to the Dev Container configuration file (devcontainer.json).
    devcontainerId String
    The ID of this resource.
    workspaceFolder String
    The workspace folder to for the Dev Container.

    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