|
|
|
@ -14,21 +14,13 @@ variable "agent_id" {
|
|
|
|
|
description = "The ID of a Coder agent."
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
variable "coder_user_token" {
|
|
|
|
|
type = string
|
|
|
|
|
description = "Coder user token for authentication. Replace with second agent?"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
variable "coder_deployment_url" {
|
|
|
|
|
type = string
|
|
|
|
|
description = "Coder Deployment URL,"
|
|
|
|
|
}
|
|
|
|
|
data "coder_workspace" "me" {}
|
|
|
|
|
|
|
|
|
|
resource "coder_script" "coder-login" {
|
|
|
|
|
agent_id = var.agent_id
|
|
|
|
|
script = templatefile("${path.module}/run.sh", {
|
|
|
|
|
CODER_USER_TOKEN : var.coder_user_token,
|
|
|
|
|
CODER_DEPLOYMENT_URL : var.coder_deployment_url
|
|
|
|
|
CODER_USER_TOKEN : data.coder_workspace.me.owner_session_token,
|
|
|
|
|
CODER_DEPLOYMENT_URL : data.coder_workspace.me.access_url
|
|
|
|
|
})
|
|
|
|
|
display_name = "Personalize"
|
|
|
|
|
icon = "/emojis/1f511.png"
|
|
|
|
|