File tree Expand file tree Collapse file tree 5 files changed +55
-5
lines changed Expand file tree Collapse file tree 5 files changed +55
-5
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,16 @@ variable "install_version" {
62
62
default = " "
63
63
}
64
64
65
+ variable "share" {
66
+ type = string
67
+ default = " owner"
68
+ validation {
69
+
70
+ condition = var. share == " owner" || var. share == " authenticated" || var. share == " public"
71
+ error_message = " Incorrect value. Please set either 'owner', 'authenticated', or 'public'."
72
+ }
73
+ }
74
+
65
75
resource "coder_script" "code-server" {
66
76
agent_id = var. agent_id
67
77
display_name = " code-server"
@@ -85,7 +95,7 @@ resource "coder_app" "code-server" {
85
95
url = " http://localhost:${ var . port } /${ var . folder != " " ? " ?folder=${ urlencode (var. folder )} " : " " } "
86
96
icon = " /icon/code.svg"
87
97
subdomain = false
88
- share = " owner "
98
+ share = var . share
89
99
90
100
healthcheck {
91
101
url = " http://localhost:${ var . port } /healthz"
Original file line number Diff line number Diff line change @@ -43,6 +43,16 @@ variable "folder" {
43
43
default = " ~"
44
44
}
45
45
46
+ variable "share" {
47
+ type = string
48
+ default = " owner"
49
+ validation {
50
+
51
+ condition = var. share == " owner" || var. share == " authenticated" || var. share == " public"
52
+ error_message = " Incorrect value. Please set either 'owner', 'authenticated', or 'public'."
53
+ }
54
+ }
55
+
46
56
resource "coder_script" "filebrowser" {
47
57
agent_id = var. agent_id
48
58
display_name = " File Browser"
@@ -64,5 +74,5 @@ resource "coder_app" "filebrowser" {
64
74
url = " http://localhost:${ var . port } "
65
75
icon = " https://raw.githubusercontent.com/filebrowser/logo/master/icon_raw.svg"
66
76
subdomain = true
67
- share = " owner "
77
+ share = var . share
68
78
}
Original file line number Diff line number Diff line change @@ -27,6 +27,16 @@ variable "port" {
27
27
default = 19999
28
28
}
29
29
30
+ variable "share" {
31
+ type = string
32
+ default = " owner"
33
+ validation {
34
+
35
+ condition = var. share == " owner" || var. share == " authenticated" || var. share == " public"
36
+ error_message = " Incorrect value. Please set either 'owner', 'authenticated', or 'public'."
37
+ }
38
+ }
39
+
30
40
resource "coder_script" "jupyter-notebook" {
31
41
agent_id = var. agent_id
32
42
display_name = " jupyter-notebook"
@@ -45,5 +55,5 @@ resource "coder_app" "jupyter-notebook" {
45
55
url = " http://localhost:${ var . port } "
46
56
icon = " /icon/jupyter.svg"
47
57
subdomain = true
48
- share = " owner "
58
+ share = var . share
49
59
}
Original file line number Diff line number Diff line change @@ -27,6 +27,16 @@ variable "port" {
27
27
default = 19999
28
28
}
29
29
30
+ variable "share" {
31
+ type = string
32
+ default = " owner"
33
+ validation {
34
+
35
+ condition = var. share == " owner" || var. share == " authenticated" || var. share == " public"
36
+ error_message = " Incorrect value. Please set either 'owner', 'authenticated', or 'public'."
37
+ }
38
+ }
39
+
30
40
resource "coder_script" "jupyterlab" {
31
41
agent_id = var. agent_id
32
42
display_name = " jupyterlab"
@@ -45,5 +55,5 @@ resource "coder_app" "jupyterlab" {
45
55
url = " http://localhost:${ var . port } "
46
56
icon = " /icon/jupyter.svg"
47
57
subdomain = true
48
- share = " owner "
58
+ share = var . share
49
59
}
Original file line number Diff line number Diff line change @@ -26,6 +26,16 @@ variable "folder" {
26
26
default = " "
27
27
}
28
28
29
+ variable "share" {
30
+ type = string
31
+ default = " owner"
32
+ validation {
33
+
34
+ condition = var. share == " owner" || var. share == " authenticated" || var. share == " public"
35
+ error_message = " Incorrect value. Please set either 'owner', 'authenticated', or 'public'."
36
+ }
37
+ }
38
+
29
39
variable "log_path" {
30
40
type = string
31
41
description = " The path to log."
@@ -67,7 +77,7 @@ resource "coder_app" "vscode-web" {
67
77
url = var. folder == " " ? " http://localhost:${ var . port } " : " http://localhost:${ var . port } ?folder=${ var . folder } "
68
78
icon = " /icon/code.svg"
69
79
subdomain = true
70
- share = " owner "
80
+ share = var . share
71
81
72
82
healthcheck {
73
83
url = " http://localhost:${ var . port } /healthz"
You can’t perform that action at this time.
0 commit comments