ready for testing
This commit is contained in:
@@ -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
|
||||
|
||||
echo "Logging into Coder..."
|
||||
|
||||
# Automatically authenticate the user if they are not
|
||||
# logged in to another deployment
|
||||
|
||||
echo "Logging into Coder..."
|
||||
|
||||
if ! coder list >/dev/null 2>&1; then
|
||||
set +x; coder login --token=$CODER_USER_TOKEN --url=$CODER_DEPLOYMENT_URL
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user