-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathresource.tf
More file actions
47 lines (43 loc) · 946 Bytes
/
resource.tf
File metadata and controls
47 lines (43 loc) · 946 Bytes
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
36
37
38
39
40
41
42
43
44
45
46
47
data "coder_workspace" "me" {
}
resource "coder_agent" "dev" {
os = "linux"
arch = "amd64"
dir = "/workspace"
api_key_scope = "all"
display_apps {
vscode = true
vscode_insiders = false
web_terminal = true
ssh_helper = false
}
metadata {
display_name = "CPU Usage"
key = "cpu_usage"
script = "coder stat cpu"
interval = 10
timeout = 1
order = 2
}
metadata {
display_name = "RAM Usage"
key = "ram_usage"
script = "coder stat mem"
interval = 10
timeout = 1
order = 1
}
order = 1
}
resource "kubernetes_pod" "dev" {
count = data.coder_workspace.me.start_count
spec {
container {
command = ["sh", "-c", coder_agent.dev.init_script]
env {
name = "CODER_AGENT_TOKEN"
value = coder_agent.dev.token
}
}
}
}