coder.Devcontainer
Explore with Pulumi AI
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:
- Agent
Id string - The
id
property of acoder.Agent
resource to associate with. - Workspace
Folder string - The workspace folder to for the Dev Container.
- Config
Path string - The path to the Dev Container configuration file (devcontainer.json).
- Devcontainer
Id string - The ID of this resource.
- Agent
Id string - The
id
property of acoder.Agent
resource to associate with. - Workspace
Folder string - The workspace folder to for the Dev Container.
- Config
Path string - The path to the Dev Container configuration file (devcontainer.json).
- Devcontainer
Id string - The ID of this resource.
- agent
Id String - The
id
property of acoder.Agent
resource to associate with. - workspace
Folder String - The workspace folder to for the Dev Container.
- config
Path String - The path to the Dev Container configuration file (devcontainer.json).
- devcontainer
Id String - The ID of this resource.
- agent
Id string - The
id
property of acoder.Agent
resource to associate with. - workspace
Folder string - The workspace folder to for the Dev Container.
- config
Path string - The path to the Dev Container configuration file (devcontainer.json).
- devcontainer
Id string - The ID of this resource.
- agent_
id str - The
id
property of acoder.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.
- agent
Id String - The
id
property of acoder.Agent
resource to associate with. - workspace
Folder String - The workspace folder to for the Dev Container.
- config
Path String - The path to the Dev Container configuration file (devcontainer.json).
- devcontainer
Id 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.
- Agent
Id string - The
id
property of acoder.Agent
resource to associate with. - Config
Path string - The path to the Dev Container configuration file (devcontainer.json).
- Devcontainer
Id string - The ID of this resource.
- Workspace
Folder string - The workspace folder to for the Dev Container.
- Agent
Id string - The
id
property of acoder.Agent
resource to associate with. - Config
Path string - The path to the Dev Container configuration file (devcontainer.json).
- Devcontainer
Id string - The ID of this resource.
- Workspace
Folder string - The workspace folder to for the Dev Container.
- agent
Id String - The
id
property of acoder.Agent
resource to associate with. - config
Path String - The path to the Dev Container configuration file (devcontainer.json).
- devcontainer
Id String - The ID of this resource.
- workspace
Folder String - The workspace folder to for the Dev Container.
- agent
Id string - The
id
property of acoder.Agent
resource to associate with. - config
Path string - The path to the Dev Container configuration file (devcontainer.json).
- devcontainer
Id string - The ID of this resource.
- workspace
Folder string - The workspace folder to for the Dev Container.
- agent_
id str - The
id
property of acoder.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.
- agent
Id String - The
id
property of acoder.Agent
resource to associate with. - config
Path String - The path to the Dev Container configuration file (devcontainer.json).
- devcontainer
Id String - The ID of this resource.
- workspace
Folder 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.