File tree 1 file changed +21
-5
lines changed
examples/templates/gcp-linux 1 file changed +21
-5
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ terraform {
6
6
}
7
7
google = {
8
8
source = " hashicorp/google"
9
- version = " ~> 4.34.0 "
9
+ version = " ~> 4.15 "
10
10
}
11
11
}
12
12
}
@@ -39,16 +39,32 @@ resource "google_compute_disk" "root" {
39
39
name = " coder-${ lower (data. coder_workspace . me . owner )} -${ lower (data. coder_workspace . me . name )} -root"
40
40
type = " pd-ssd"
41
41
zone = var. zone
42
- image = " debian-cloud/debian-11 "
42
+ image = " debian-cloud/debian-10 "
43
43
lifecycle {
44
44
ignore_changes = [image ]
45
45
}
46
46
}
47
47
48
48
resource "coder_agent" "main" {
49
- auth = " google-instance-identity"
50
- arch = " amd64"
51
- os = " linux"
49
+ auth = " google-instance-identity"
50
+ arch = " amd64"
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" {
You can’t perform that action at this time.
0 commit comments