chore(examples): Add login_before_ready and startup_script_timeout (#5880)

This commit is contained in:
Mathias Fredriksson
2023-01-27 23:01:48 +02:00
committed by GitHub
parent 90c4d5d28a
commit a1212014df
16 changed files with 126 additions and 78 deletions

View File

@ -2,7 +2,7 @@ terraform {
required_providers {
coder = {
source = "coder/coder"
version = "0.6.6"
version = "0.6.10"
}
google = {
source = "hashicorp/google"
@ -46,15 +46,18 @@ resource "google_compute_disk" "root" {
}
resource "coder_agent" "main" {
auth = "google-instance-identity"
arch = "amd64"
os = "linux"
startup_script = <<EOT
#!/bin/bash
auth = "google-instance-identity"
arch = "amd64"
os = "linux"
login_before_ready = false
startup_script_timeout = 180
startup_script = <<-EOT
set -e
# install and start code-server
curl -fsSL https://code-server.dev/install.sh | sh -s -- --version 4.8.3 | tee code-server-install.log
code-server --auth none --port 13337 | tee code-server-install.log &
curl -fsSL https://code-server.dev/install.sh | sh -s -- --version 4.8.3
code-server --auth none --port 13337 >/tmp/code-server.log 2>&1 &
EOT
}