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

Commit da4a561

Browse files
authored
fix(code-server): add variable for subdomain option (#267)
1 parent 8837412 commit da4a561

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

code-server/main.tf

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,15 @@ variable "auto_install_extensions" {
113113
default = false
114114
}
115115

116+
variable "subdomain" {
117+
type = bool
118+
description = <<-EOT
119+
Determines whether the app will be accessed via it's own subdomain or whether it will be accessed via a path on Coder.
120+
If wildcards have not been setup by the administrator then apps with "subdomain" set to true will not be accessible.
121+
EOT
122+
default = false
123+
}
124+
116125
resource "coder_script" "code-server" {
117126
agent_id = var.agent_id
118127
display_name = "code-server"
@@ -154,7 +163,7 @@ resource "coder_app" "code-server" {
154163
display_name = var.display_name
155164
url = "http://localhost:${var.port}/${var.folder != "" ? "?folder=${urlencode(var.folder)}" : ""}"
156165
icon = "/icon/code.svg"
157-
subdomain = false
166+
subdomain = var.subdomain
158167
share = var.share
159168
order = var.order
160169

0 commit comments

Comments
 (0)