47 lines
1.2 KiB
HCL
47 lines
1.2 KiB
HCL
# 定義 Terraform 輸出(使用者在 Coder Dashboard 可看到)
|
|
|
|
output "workspace_owner" {
|
|
description = "Workspace owner (GitHub username)"
|
|
value = data.coder_workspace_owner.me.name
|
|
}
|
|
|
|
output "workspace_id" {
|
|
description = "Workspace unique ID"
|
|
value = data.coder_workspace.me.id
|
|
}
|
|
|
|
output "agent_status" {
|
|
description = "Coder Agent status"
|
|
value = "Check agent details in Coder UI"
|
|
}
|
|
|
|
output "code_server_info" {
|
|
description = "code-server 存取資訊"
|
|
value = "Click 'code-server' button in Workspace details"
|
|
}
|
|
|
|
output "volume_name" {
|
|
description = "Docker volume name for this workspace"
|
|
value = "coder-${data.coder_workspace.me.id}-home"
|
|
}
|
|
|
|
output "git_config" {
|
|
description = "Git 已配置的使用者資訊"
|
|
value = {
|
|
author_name = coalesce(data.coder_workspace_owner.me.full_name, data.coder_workspace_owner.me.name)
|
|
author_email = data.coder_workspace_owner.me.email
|
|
}
|
|
sensitive = true
|
|
}
|
|
|
|
output "resources_monitored" {
|
|
description = "已啟用的監控指標"
|
|
value = [
|
|
"CPU Usage (current & host)",
|
|
"RAM Usage (current & host)",
|
|
"Disk Usage (home directory)",
|
|
"System Load Average",
|
|
"Swap Usage"
|
|
]
|
|
}
|