This repository was archived by the owner on May 15, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ terraform {
4
4
required_providers {
5
5
coder = {
6
6
source = " coder/coder"
7
- version = " >= 0.17 "
7
+ version = " >= 2.1 "
8
8
}
9
9
}
10
10
}
@@ -39,13 +39,13 @@ variable "slug" {
39
39
}
40
40
41
41
variable "settings" {
42
- type = map ( string )
42
+ type = any
43
43
description = " A map of settings to apply to code-server."
44
44
default = {}
45
45
}
46
46
47
47
variable "machine-settings" {
48
- type = map ( string )
48
+ type = any
49
49
description = " A map of template level machine settings to apply to code-server. This will be overwritten at each container start."
50
50
default = {}
51
51
}
@@ -128,6 +128,20 @@ variable "subdomain" {
128
128
default = false
129
129
}
130
130
131
+ variable "open_in" {
132
+ type = string
133
+ description = <<- EOT
134
+ Determines where the app will be opened. Valid values are `"tab"` and `"slim-window" (default)`.
135
+ `"tab"` opens in a new tab in the same browser window.
136
+ `"slim-window"` opens a new browser window without navigation controls.
137
+ EOT
138
+ default = " slim-window"
139
+ validation {
140
+ condition = contains ([" tab" , " slim-window" ], var. open_in )
141
+ error_message = " The 'open_in' variable must be one of: 'tab', 'slim-window'."
142
+ }
143
+ }
144
+
131
145
resource "coder_script" "code-server" {
132
146
agent_id = var. agent_id
133
147
display_name = " code-server"
@@ -173,10 +187,11 @@ resource "coder_app" "code-server" {
173
187
subdomain = var. subdomain
174
188
share = var. share
175
189
order = var. order
190
+ open_in = var. open_in
176
191
177
192
healthcheck {
178
193
url = " http://localhost:${ var . port } /healthz"
179
194
interval = 5
180
195
threshold = 6
181
196
}
182
- }
197
+ }
You can’t perform that action at this time.
0 commit comments