Skip to content

Commit 1cc51b0

Browse files
johnstcnmatifali
andauthored
chore(examples): remove deprecated startup_script_timeout and shutdown_script_timeout (#12104)
Removes deprecated startup_script_timeout and shutdown_script_timeout from our example templates. Co-authored-by: Muhammad Atif Ali <atif@coder.com>
1 parent 3e68650 commit 1cc51b0

File tree

14 files changed

+40
-57
lines changed

14 files changed

+40
-57
lines changed

.github/pr-deployments/template/main.tf

+3-4
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,9 @@ provider "kubernetes" {
8888
data "coder_workspace" "me" {}
8989

9090
resource "coder_agent" "main" {
91-
os = "linux"
92-
arch = "amd64"
93-
startup_script_timeout = 180
94-
startup_script = <<-EOT
91+
os = "linux"
92+
arch = "amd64"
93+
startup_script = <<-EOT
9594
set -e
9695
9796
# install and start code-server

dogfood/main.tf

+1-2
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,7 @@ resource "coder_agent" "dev" {
259259
timeout = 5
260260
}
261261

262-
startup_script_timeout = 60
263-
startup_script = <<-EOT
262+
startup_script = <<-EOT
264263
set -eux -o pipefail
265264
266265
# Allow synchronization between scripts.

examples/jfrog/docker/main.tf

+3-4
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,9 @@ resource "artifactory_scoped_token" "me" {
5959
}
6060

6161
resource "coder_agent" "main" {
62-
arch = data.coder_provisioner.me.arch
63-
os = "linux"
64-
startup_script_timeout = 180
65-
startup_script = <<-EOT
62+
arch = data.coder_provisioner.me.arch
63+
os = "linux"
64+
startup_script = <<-EOT
6665
set -e
6766
6867
# install and start code-server

examples/parameters/main.tf

+3-4
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,9 @@ data "coder_workspace" "me" {
2323
}
2424

2525
resource "coder_agent" "main" {
26-
arch = data.coder_provisioner.me.arch
27-
os = "linux"
28-
startup_script_timeout = 180
29-
startup_script = <<-EOT
26+
arch = data.coder_provisioner.me.arch
27+
os = "linux"
28+
startup_script = <<-EOT
3029
set -e
3130
3231
# install and start code-server

examples/templates/aws-linux/main.tf

+5-6
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,11 @@ data "aws_ami" "ubuntu" {
157157
}
158158

159159
resource "coder_agent" "dev" {
160-
count = data.coder_workspace.me.start_count
161-
arch = "amd64"
162-
auth = "aws-instance-identity"
163-
os = "linux"
164-
startup_script_timeout = 180
165-
startup_script = <<-EOT
160+
count = data.coder_workspace.me.start_count
161+
arch = "amd64"
162+
auth = "aws-instance-identity"
163+
os = "linux"
164+
startup_script = <<-EOT
166165
set -e
167166
168167
# install and start code-server

examples/templates/devcontainer-docker/main.tf

+4-5
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,16 @@ data "coder_workspace" "me" {
1919
}
2020

2121
resource "coder_agent" "main" {
22-
arch = data.coder_provisioner.me.arch
23-
os = "linux"
24-
startup_script_timeout = 180
25-
startup_script = <<-EOT
22+
arch = data.coder_provisioner.me.arch
23+
os = "linux"
24+
startup_script = <<-EOT
2625
set -e
2726
2827
# install and start code-server
2928
curl -fsSL https://code-server.dev/install.sh | sh -s -- --method=standalone --prefix=/tmp/code-server --version 4.11.0
3029
/tmp/code-server/bin/code-server --auth none --port 13337 >/tmp/code-server.log 2>&1 &
3130
EOT
32-
dir = "/worskpaces"
31+
dir = "/worskpaces"
3332

3433
# These environment variables allow you to make Git commits right away after creating a
3534
# workspace. Note that they take precedence over configuration defined in ~/.gitconfig!

examples/templates/devcontainer-kubernetes/main.tf

+4-5
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,16 @@ data "coder_workspace" "me" {
4444
}
4545

4646
resource "coder_agent" "main" {
47-
arch = data.coder_provisioner.me.arch
48-
os = "linux"
49-
startup_script_timeout = 180
50-
startup_script = <<-EOT
47+
arch = data.coder_provisioner.me.arch
48+
os = "linux"
49+
startup_script = <<-EOT
5150
set -e
5251
5352
# install and start code-server
5453
curl -fsSL https://code-server.dev/install.sh | sh -s -- --method=standalone --prefix=/tmp/code-server --version 4.11.0
5554
/tmp/code-server/bin/code-server --auth none --port 13337 >/tmp/code-server.log 2>&1 &
5655
EOT
57-
dir = "/workspaces"
56+
dir = "/workspaces"
5857

5958
# These environment variables allow you to make Git commits right away after creating a
6059
# workspace. Note that they take precedence over configuration defined in ~/.gitconfig!

examples/templates/docker/main.tf

+3-4
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,9 @@ data "coder_workspace" "me" {
2323
}
2424

2525
resource "coder_agent" "main" {
26-
arch = data.coder_provisioner.me.arch
27-
os = "linux"
28-
startup_script_timeout = 180
29-
startup_script = <<-EOT
26+
arch = data.coder_provisioner.me.arch
27+
os = "linux"
28+
startup_script = <<-EOT
3029
set -e
3130
3231
# install and start code-server

examples/templates/gcp-linux/main.tf

+4-5
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,10 @@ resource "google_compute_disk" "root" {
7373
}
7474

7575
resource "coder_agent" "main" {
76-
auth = "google-instance-identity"
77-
arch = "amd64"
78-
os = "linux"
79-
startup_script_timeout = 180
80-
startup_script = <<-EOT
76+
auth = "google-instance-identity"
77+
arch = "amd64"
78+
os = "linux"
79+
startup_script = <<-EOT
8180
set -e
8281
8382
# install and start code-server

examples/templates/gcp-vm-container/main.tf

+4-6
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,10 @@ data "coder_workspace" "me" {
6363
}
6464

6565
resource "coder_agent" "main" {
66-
auth = "google-instance-identity"
67-
arch = "amd64"
68-
os = "linux"
69-
70-
startup_script_timeout = 180
71-
startup_script = <<-EOT
66+
auth = "google-instance-identity"
67+
arch = "amd64"
68+
os = "linux"
69+
startup_script = <<-EOT
7270
set -e
7371
7472
# install and start code-server

examples/templates/kubernetes/main.tf

+3-4
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,9 @@ provider "kubernetes" {
103103
data "coder_workspace" "me" {}
104104

105105
resource "coder_agent" "main" {
106-
os = "linux"
107-
arch = "amd64"
108-
startup_script_timeout = 180
109-
startup_script = <<-EOT
106+
os = "linux"
107+
arch = "amd64"
108+
startup_script = <<-EOT
110109
set -e
111110
112111
# install and start code-server

examples/templates/nomad-docker/main.tf

+3-4
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,9 @@ data "coder_parameter" "memory" {
8888
data "coder_workspace" "me" {}
8989

9090
resource "coder_agent" "main" {
91-
os = "linux"
92-
arch = "amd64"
93-
startup_script_timeout = 180
94-
startup_script = <<-EOT
91+
os = "linux"
92+
arch = "amd64"
93+
startup_script = <<-EOT
9594
set -e
9695
# install and start code-server
9796
curl -fsSL https://code-server.dev/install.sh | sh -s -- --method=standalone --prefix=/tmp/code-server

scaletest/templates/scaletest-runner/main.tf

-2
Original file line numberDiff line numberDiff line change
@@ -625,8 +625,6 @@ resource "coder_agent" "main" {
625625
vscode = false
626626
ssh_helper = false
627627
}
628-
startup_script_timeout = 86400
629-
shutdown_script_timeout = 7200
630628
startup_script_behavior = "blocking"
631629
startup_script = file("startup.sh")
632630
shutdown_script = file("shutdown.sh")

scaletest/terraform/k8s/coder.tf

-2
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,6 @@ resource "local_file" "kubernetes_template" {
304304
resource "coder_agent" "main" {
305305
os = "linux"
306306
arch = "amd64"
307-
startup_script_timeout = 180
308-
startup_script = ""
309307
}
310308
311309
resource "kubernetes_pod" "main" {

0 commit comments

Comments
 (0)