Skip to content

Commit 22c4a55

Browse files
stirbymatifali
authored andcommitted
additional extending templates refactors
1 parent 1235238 commit 22c4a55

File tree

2 files changed

+11
-28
lines changed

2 files changed

+11
-28
lines changed

docs/admin/templates/extending-templates/README.md

Lines changed: 11 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,12 @@
11
# Extending templates
22

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 -->
64

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.
186

197
## Workspace agents
208

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.
2210

2311
```hcl
2412
resource "coder_agent" "dev" {
@@ -31,7 +19,9 @@ resource "coder_agent" "dev" {
3119
}
3220
```
3321

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.
3525

3626
![A healthy workspace agent](../../../images/templates/healthy-workspace-agent.png)
3727

@@ -45,25 +35,18 @@ The resources you define in a template may be _ephemeral_ or _persistent_. Persi
4535
4636
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).
4737

48-
### Example usage
49-
5038
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.
5139

5240

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-
6141
## Coder apps
6242

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+
![Coder Apps in the dashboard](../../../images/admin/templates/coder-apps-ui.png)
6446

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).
6648

49+
Check out our [module registry](https://registry.coder.com/modules) for additional Coder apps from the team and our OSS community.
6750

6851
<children>
6952

264 KB
Loading

0 commit comments

Comments
 (0)