File tree 2 files changed +32
-0
lines changed 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,22 @@ resource "coder_agent" "main" {
49
49
auth = " google-instance-identity"
50
50
arch = " amd64"
51
51
os = " linux"
52
+ startup_script = << EOT
53
+ #!/bin/bash
54
+
55
+ # install and start code-server
56
+ curl -fsSL https://code-server.dev/install.sh | sh | tee code-server-install.log
57
+ code-server --auth none --port 13337 | tee code-server-install.log &
58
+ EOT
59
+ }
60
+
61
+ # code-server
62
+ resource "coder_app" "code-server" {
63
+ agent_id = coder_agent. main . id
64
+ name = " code-server"
65
+ icon = " /icon/code.svg"
66
+ url = " http://localhost:13337?folder=/home/coder"
67
+ relative_path = true
52
68
}
53
69
54
70
resource "google_compute_instance" "dev" {
Original file line number Diff line number Diff line change @@ -39,6 +39,22 @@ resource "coder_agent" "main" {
39
39
auth = " google-instance-identity"
40
40
arch = " amd64"
41
41
os = " linux"
42
+ startup_script = << EOT
43
+ #!/bin/bash
44
+
45
+ # install and start code-server
46
+ curl -fsSL https://code-server.dev/install.sh | sh | tee code-server-install.log
47
+ code-server --auth none --port 13337 | tee code-server-install.log &
48
+ EOT
49
+ }
50
+
51
+ # code-server
52
+ resource "coder_app" "code-server" {
53
+ agent_id = coder_agent. main . id
54
+ name = " code-server"
55
+ icon = " /icon/code.svg"
56
+ url = " http://localhost:13337?folder=/home/coder"
57
+ relative_path = true
42
58
}
43
59
44
60
module "gce-container" {
You can’t perform that action at this time.
0 commit comments