Skip to content

Commit ca8177f

Browse files
committed
Start writing docs
1 parent 3cf235c commit ca8177f

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

docs/templates/resource-metadata.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,26 @@ To make easier for you to customize your resource we added some built-in icons:
9797

9898
We also have other icons related to the IDEs. You can see all the icons [here](https://github.com/coder/coder/tree/main/site/static/icon).
9999

100+
## Agent Metadata
101+
102+
In cases where you want to present automatically updating, dynamic values. You
103+
can use the `metadata` block in the `coder_agent` resource. For example:
104+
105+
```hcl
106+
resource "coder_agent" "dev" {
107+
os = "linux"
108+
arch = "amd64"
109+
dir = "/workspace"
110+
metadata {
111+
name = "Process Count"
112+
cmd = "ps aux | wc -l"
113+
refresh = 5s
114+
# Any data above this width will require scrolling.
115+
width = 5
116+
}
117+
}
118+
```
119+
100120
## Up next
101121

102122
- Learn about [secrets](../secrets.md)

0 commit comments

Comments
 (0)