You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/admin/templates/extending-templates/README.md
+11-28Lines changed: 11 additions & 28 deletions
Original file line number
Diff line number
Diff line change
@@ -1,24 +1,12 @@
1
1
# Extending templates
2
2
3
-
There are a variety of Coder-native features to extend the configuration of your development environments. Many of the following features are defined in your templates using the [Coder Terraform provider](https://registry.terraform.io/providers/coder/coder/latest/docs). The provider docs will provide code examples for usage; alternatively, you can view our [example templates](https://github.com/coder/coder/tree/main/examples/templates) to get started.
4
-
5
-
<!-- TODO: Review structure
3
+
<!-- TODO: Review structure and links -->
6
4
7
-
extending-templates/
8
-
README.md
9
-
- workspace agent overview
10
-
- resource persistence
11
-
- coder apps
12
-
- coder parameters
13
-
- template variables
14
-
agent-metadata.md (from old docs)
15
-
resource-metadata.md (from old docs)
16
-
resource-ordering.md (from old docs)
17
-
-->
5
+
There are a variety of Coder-native features to extend the configuration of your development environments. Many of the following features are defined in your templates using the [Coder Terraform provider](https://registry.terraform.io/providers/coder/coder/latest/docs). The provider docs will provide code examples for usage; alternatively, you can view our [example templates](https://github.com/coder/coder/tree/main/examples/templates) to get started.
18
6
19
7
## Workspace agents
20
8
21
-
For users to connect to a workspace, the template must include a [`coder_agent`](https://registry.terraform.io/providers/coder/coder/latest/docs/resources/agent). The associated agent will facilitate [workspace connections](../../../user-guides/workspace-access/README.md) via SSH, port forwarding, and IDEs. The agent may also display [workspace metadata](#agent-metadata) like resource usage.
9
+
For users to connect to a workspace, the template must include a [`coder_agent`](https://registry.terraform.io/providers/coder/coder/latest/docs/resources/agent). The associated agent will facilitate [workspace connections](../../../user-guides/workspace-access/README.md) via SSH, port forwarding, and IDEs. The agent may also display real-time [workspace metadata](./agent-metadata.md) like resource usage.
22
10
23
11
```hcl
24
12
resource "coder_agent" "dev" {
@@ -31,7 +19,9 @@ resource "coder_agent" "dev" {
31
19
}
32
20
```
33
21
34
-
Templates must include some computational resource to start the agent. All processes on the workspace are then spawned from the agent. All information in the dashboard's workspace view is pulled from the agent.
22
+
You can also leverage [resource metadata](./resource-metadata.md) to display static resource information from your template.
23
+
24
+
Templates must include some computational resource to start the agent. All processes on the workspace are then spawned from the agent. It also provides all information displayed in the dashboard's workspace view.
@@ -45,25 +35,18 @@ The resources you define in a template may be _ephemeral_ or _persistent_. Persi
45
35
46
36
Template resources follow the [behavior of Terraform resources](https://developer.hashicorp.com/terraform/language/resources/behavior#how-terraform-applies-a-configuration) and can be further configured using the [lifecycle argument](https://developer.hashicorp.com/terraform/language/meta-arguments/lifecycle).
47
37
48
-
### Example usage
49
-
50
38
A common configuration is a template whose only persistent resource is the home directory. This allows the developer to retain their work while ensuring the rest of their environment is consistently up-to-date on each workspace restart.
51
39
52
40
53
-
## Template variables
54
-
55
-
You can show live operational metrics to workspace users with agent metadata. It is the dynamic complement of resource metadata.
56
-
57
-
You specify agent metadata in the coder_agent.
58
-
59
-
## Parameters
60
-
61
41
## Coder apps
62
42
63
-
### App ordering
43
+
Additional IDEs, documentation, or services can be associated to your workspace using the [`coder_app`](https://registry.terraform.io/providers/coder/coder/latest/docs/resources/app) resource.
44
+
45
+

64
46
65
-
## Agent metadata
47
+
Note that some apps are associated to the agent by default as [`display_apps`](https://registry.terraform.io/providers/coder/coder/latest/docs/resources/agent#nested-schema-for-display_apps) and can be hidden directly in the [`coder_agent`](https://registry.terraform.io/providers/coder/coder/latest/docs/resources/agent) resource. You can arrange the display orientation of Coder apps in your template using [resource ordering](./resource-ordering.md).
66
48
49
+
Check out our [module registry](https://registry.coder.com/modules) for additional Coder apps from the team and our OSS community.
0 commit comments