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

Commit 210481b

Browse files
authored
Add validation
1 parent da34dc9 commit 210481b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

code-server/main.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@ variable "open_in" {
130130
`"slim-window"` opens a new browser window without navigation controls.
131131
EOT
132132
default = "slim-window"
133+
validation {
134+
condition = contains(["tab", "slim-window"], var.open_in)
135+
error_message = "The 'open_in' variable must be one of: 'tab', 'slim-window'."
136+
}
133137
}
134138

135139
resource "coder_script" "code-server" {

0 commit comments

Comments
 (0)