Skip to content

chore(examples): remove deprecated startup_script_timeout #12104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/pr-deployments/template/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,9 @@ provider "kubernetes" {
data "coder_workspace" "me" {}

resource "coder_agent" "main" {
os = "linux"
arch = "amd64"
startup_script_timeout = 180
startup_script = <<-EOT
os = "linux"
arch = "amd64"
startup_script = <<-EOT
set -e

# install and start code-server
Expand Down
3 changes: 1 addition & 2 deletions dogfood/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,7 @@ resource "coder_agent" "dev" {
timeout = 5
}

startup_script_timeout = 60
startup_script = <<-EOT
startup_script = <<-EOT
set -eux -o pipefail

# Allow synchronization between scripts.
Expand Down
7 changes: 3 additions & 4 deletions examples/jfrog/docker/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,9 @@ resource "artifactory_scoped_token" "me" {
}

resource "coder_agent" "main" {
arch = data.coder_provisioner.me.arch
os = "linux"
startup_script_timeout = 180
startup_script = <<-EOT
arch = data.coder_provisioner.me.arch
os = "linux"
startup_script = <<-EOT
set -e

# install and start code-server
Expand Down
7 changes: 3 additions & 4 deletions examples/parameters/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ data "coder_workspace" "me" {
}

resource "coder_agent" "main" {
arch = data.coder_provisioner.me.arch
os = "linux"
startup_script_timeout = 180
startup_script = <<-EOT
arch = data.coder_provisioner.me.arch
os = "linux"
startup_script = <<-EOT
set -e

# install and start code-server
Expand Down
11 changes: 5 additions & 6 deletions examples/templates/aws-linux/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,11 @@ data "aws_ami" "ubuntu" {
}

resource "coder_agent" "dev" {
count = data.coder_workspace.me.start_count
arch = "amd64"
auth = "aws-instance-identity"
os = "linux"
startup_script_timeout = 180
startup_script = <<-EOT
count = data.coder_workspace.me.start_count
arch = "amd64"
auth = "aws-instance-identity"
os = "linux"
startup_script = <<-EOT
set -e

# install and start code-server
Expand Down
9 changes: 4 additions & 5 deletions examples/templates/devcontainer-docker/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,16 @@ data "coder_workspace" "me" {
}

resource "coder_agent" "main" {
arch = data.coder_provisioner.me.arch
os = "linux"
startup_script_timeout = 180
startup_script = <<-EOT
arch = data.coder_provisioner.me.arch
os = "linux"
startup_script = <<-EOT
set -e

# install and start code-server
curl -fsSL https://code-server.dev/install.sh | sh -s -- --method=standalone --prefix=/tmp/code-server --version 4.11.0
/tmp/code-server/bin/code-server --auth none --port 13337 >/tmp/code-server.log 2>&1 &
EOT
dir = "/worskpaces"
dir = "/worskpaces"

# These environment variables allow you to make Git commits right away after creating a
# workspace. Note that they take precedence over configuration defined in ~/.gitconfig!
Expand Down
9 changes: 4 additions & 5 deletions examples/templates/devcontainer-kubernetes/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,16 @@ data "coder_workspace" "me" {
}

resource "coder_agent" "main" {
arch = data.coder_provisioner.me.arch
os = "linux"
startup_script_timeout = 180
startup_script = <<-EOT
arch = data.coder_provisioner.me.arch
os = "linux"
startup_script = <<-EOT
set -e

# install and start code-server
curl -fsSL https://code-server.dev/install.sh | sh -s -- --method=standalone --prefix=/tmp/code-server --version 4.11.0
/tmp/code-server/bin/code-server --auth none --port 13337 >/tmp/code-server.log 2>&1 &
EOT
dir = "/workspaces"
dir = "/workspaces"

# These environment variables allow you to make Git commits right away after creating a
# workspace. Note that they take precedence over configuration defined in ~/.gitconfig!
Expand Down
7 changes: 3 additions & 4 deletions examples/templates/docker/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ data "coder_workspace" "me" {
}

resource "coder_agent" "main" {
arch = data.coder_provisioner.me.arch
os = "linux"
startup_script_timeout = 180
startup_script = <<-EOT
arch = data.coder_provisioner.me.arch
os = "linux"
startup_script = <<-EOT
set -e

# install and start code-server
Expand Down
9 changes: 4 additions & 5 deletions examples/templates/gcp-linux/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,10 @@ resource "google_compute_disk" "root" {
}

resource "coder_agent" "main" {
auth = "google-instance-identity"
arch = "amd64"
os = "linux"
startup_script_timeout = 180
startup_script = <<-EOT
auth = "google-instance-identity"
arch = "amd64"
os = "linux"
startup_script = <<-EOT
set -e

# install and start code-server
Expand Down
10 changes: 4 additions & 6 deletions examples/templates/gcp-vm-container/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,10 @@ data "coder_workspace" "me" {
}

resource "coder_agent" "main" {
auth = "google-instance-identity"
arch = "amd64"
os = "linux"

startup_script_timeout = 180
startup_script = <<-EOT
auth = "google-instance-identity"
arch = "amd64"
os = "linux"
startup_script = <<-EOT
set -e

# install and start code-server
Expand Down
7 changes: 3 additions & 4 deletions examples/templates/kubernetes/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,9 @@ provider "kubernetes" {
data "coder_workspace" "me" {}

resource "coder_agent" "main" {
os = "linux"
arch = "amd64"
startup_script_timeout = 180
startup_script = <<-EOT
os = "linux"
arch = "amd64"
startup_script = <<-EOT
set -e

# install and start code-server
Expand Down
7 changes: 3 additions & 4 deletions examples/templates/nomad-docker/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,9 @@ data "coder_parameter" "memory" {
data "coder_workspace" "me" {}

resource "coder_agent" "main" {
os = "linux"
arch = "amd64"
startup_script_timeout = 180
startup_script = <<-EOT
os = "linux"
arch = "amd64"
startup_script = <<-EOT
set -e
# install and start code-server
curl -fsSL https://code-server.dev/install.sh | sh -s -- --method=standalone --prefix=/tmp/code-server
Expand Down
2 changes: 0 additions & 2 deletions scaletest/templates/scaletest-runner/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -625,8 +625,6 @@ resource "coder_agent" "main" {
vscode = false
ssh_helper = false
}
startup_script_timeout = 86400
shutdown_script_timeout = 7200
startup_script_behavior = "blocking"
startup_script = file("startup.sh")
shutdown_script = file("shutdown.sh")
Expand Down
2 changes: 0 additions & 2 deletions scaletest/terraform/k8s/coder.tf
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,6 @@ resource "local_file" "kubernetes_template" {
resource "coder_agent" "main" {
os = "linux"
arch = "amd64"
startup_script_timeout = 180
startup_script = ""
}

resource "kubernetes_pod" "main" {
Expand Down