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

fix(code-server): add variable for subdomain option #267

Merged
merged 1 commit into from
Jul 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion code-server/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,15 @@ variable "auto_install_extensions" {
default = false
}

variable "subdomain" {
type = bool
description = <<-EOT
Determines whether the app will be accessed via it's own subdomain or whether it will be accessed via a path on Coder.
If wildcards have not been setup by the administrator then apps with "subdomain" set to true will not be accessible.
EOT
default = false
}

resource "coder_script" "code-server" {
agent_id = var.agent_id
display_name = "code-server"
Expand Down Expand Up @@ -154,7 +163,7 @@ resource "coder_app" "code-server" {
display_name = var.display_name
url = "http://localhost:${var.port}/${var.folder != "" ? "?folder=${urlencode(var.folder)}" : ""}"
icon = "/icon/code.svg"
subdomain = false
subdomain = var.subdomain
share = var.share
order = var.order

Expand Down