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