Files
docker_stack/vs-code-server/template/variables.tf
2025-11-17 00:46:01 +08:00

27 lines
803 B
HCL

# 此文件定義 template 的可配置變數
# 使用者在建立 Workspace 時可以填入這些參數
variable "github_token" {
description = "GitHub Personal Access Token for GitHub Copilot authentication (optional, will auto-use OIDC if not provided)"
type = string
sensitive = true
default = ""
# 使用者提示
validation {
condition = length(var.github_token) == 0 || startswith(var.github_token, "ghp_")
error_message = "GitHub token should start with 'ghp_' or be empty."
}
}
# 未來可擴展的變數(示例,目前不需要):
# variable "extensions" {
# description = "VSCode extensions to auto-install"
# type = list(string)
# default = [
# "github.copilot",
# "ms-vscode.cpptools",
# "ms-python.python"
# ]
# }