From c0f035e5e0c9ce7d4d6b73e46ee0fe346899a228 Mon Sep 17 00:00:00 2001 From: Stephen Kirby Date: Fri, 29 Sep 2023 15:44:31 +0000 Subject: [PATCH] ready for testing --- coder-login/main.tf | 5 ++--- coder-login/run.sh | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/coder-login/main.tf b/coder-login/main.tf index 0bde3e3..07e483f 100644 --- a/coder-login/main.tf +++ b/coder-login/main.tf @@ -24,15 +24,14 @@ variable "coder_deployment_url" { description = "Coder Deployment URL," } - -resource "coder_script" "personalize" { +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 }) display_name = "Personalize" - icon = "/icon/personalize.svg" + icon = "/emojis/1f511.png" log_path = var.log_path run_on_start = true start_blocks_login = true diff --git a/coder-login/run.sh b/coder-login/run.sh index 12034cb..3158f2d 100644 --- a/coder-login/run.sh +++ b/coder-login/run.sh @@ -1,11 +1,10 @@ #!/usr/bin/env sh -# Logs the coder user in +# Automatically authenticate the user if they are not +# logged in to another deployment echo "Logging into Coder..." -# Automatically authenticate the user if they are not -# logged in to another deployment if ! coder list >/dev/null 2>&1; then set +x; coder login --token=$CODER_USER_TOKEN --url=$CODER_DEPLOYMENT_URL else