-
Notifications
You must be signed in to change notification settings - Fork 55
/
Copy pathmain.tf
39 lines (34 loc) · 943 Bytes
/
main.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
36
37
38
39
terraform {
required_version = ">= 1.0"
required_providers {
coder = {
source = "coder/coder"
version = ">= 0.12"
}
}
}
variable "agent_id" {
type = string
description = "The ID of a Coder agent."
}
variable "path" {
type = string
description = "The path to a script that will be ran on start enabling a user to personalize their workspace."
default = "~/personalize"
}
variable "log_path" {
type = string
description = "The path to a log file that will contain the output of the personalize script."
default = "~/personalize.log"
}
resource "coder_script" "personalize" {
agent_id = var.agent_id
script = templatefile("${path.module}/run.sh", {
PERSONALIZE_PATH : var.path,
})
display_name = "Personalize"
icon = "/icon/personalize.svg"
log_path = var.log_path
run_on_start = true
start_blocks_login = true
}