-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathresource.tf
35 lines (32 loc) · 901 Bytes
/
resource.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
data "coder_workspace" "me" {}
resource "coder_agent" "dev" {
os = "linux"
arch = "amd64"
dir = "/workspace"
startup_script = <<EOF
curl -fsSL https://code-server.dev/install.sh | sh
code-server --auth none --port 13337
EOF
}
resource "coder_app" "code-server" {
agent_id = coder_agent.dev.id
slug = "code-server"
display_name = "VS Code"
icon = "${data.coder_workspace.me.access_url}/icon/code.svg"
url = "http://localhost:13337"
share = "owner"
subdomain = false
open_in = "window"
healthcheck {
url = "http://localhost:13337/healthz"
interval = 5
threshold = 6
}
}
resource "coder_app" "vim" {
agent_id = coder_agent.dev.id
slug = "vim"
display_name = "Vim"
icon = "${data.coder_workspace.me.access_url}/icon/vim.svg"
command = "vim"
}