Skip to content
This repository was archived by the owner on May 15, 2025. It is now read-only.

Commit c76ec5e

Browse files
committed
Resolve bad fetch/sync
1 parent 65ace0e commit c76ec5e

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

code-server/main.tf

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
coder = {
66
source = "coder/coder"
7-
version = ">= 0.17"
7+
version = ">= 2.1"
88
}
99
}
1010
}
@@ -39,13 +39,13 @@ variable "slug" {
3939
}
4040

4141
variable "settings" {
42-
type = map(string)
42+
type = any
4343
description = "A map of settings to apply to code-server."
4444
default = {}
4545
}
4646

4747
variable "machine-settings" {
48-
type = map(string)
48+
type = any
4949
description = "A map of template level machine settings to apply to code-server. This will be overwritten at each container start."
5050
default = {}
5151
}
@@ -128,6 +128,20 @@ variable "subdomain" {
128128
default = false
129129
}
130130

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+
131145
resource "coder_script" "code-server" {
132146
agent_id = var.agent_id
133147
display_name = "code-server"
@@ -173,10 +187,11 @@ resource "coder_app" "code-server" {
173187
subdomain = var.subdomain
174188
share = var.share
175189
order = var.order
190+
open_in = var.open_in
176191

177192
healthcheck {
178193
url = "http://localhost:${var.port}/healthz"
179194
interval = 5
180195
threshold = 6
181196
}
182-
}
197+
}

0 commit comments

Comments
 (0)