ready for testing

pull/68/head
Stephen Kirby 2 years ago
parent aac27055e6
commit c0f035e5e0

@ -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

@ -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

Loading…
Cancel
Save