Skip to content

Commit db3bfe0

Browse files
committed
updated coder_script description to note parallelism
1 parent 821bfec commit db3bfe0

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

examples/resources/coder_script/resource.tf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,19 @@ resource "coder_script" "nightly_sleep_reminder" {
3333
display_name = "Nightly update"
3434
icon = "/icon/database.svg"
3535
cron = "0 22 * * *"
36-
script = <<EOF
36+
script = <<EOF
3737
#!/bin/sh
3838
echo "Running nightly update"
3939
sudo apt-get install
4040
EOF
4141
}
4242

4343
resource "coder_script" "shutdown" {
44-
agent_id = coder_agent.dev.id
45-
display_name = "Stop daemon server"
46-
run_on_stop = true
47-
icon = "/icons/memory.svg"
48-
script = <<EOF
44+
agent_id = coder_agent.dev.id
45+
display_name = "Stop daemon server"
46+
run_on_stop = true
47+
icon = "/icons/memory.svg"
48+
script = <<EOF
4949
#!/bin/sh
5050
kill $(lsof -i :3002 -t) >/tmp/pid.log 2>&1 &
5151
EOF

provider/script.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func scriptResource() *schema.Resource {
1717
return &schema.Resource{
1818
SchemaVersion: 1,
1919

20-
Description: "Use this resource to run a script from an agent.",
20+
Description: "Use this resource to run a script from an agent. When multiple scripts are assigned to the same agent, they are executed in parallel.",
2121
CreateContext: func(_ context.Context, rd *schema.ResourceData, _ interface{}) diag.Diagnostics {
2222
rd.SetId(uuid.NewString())
2323
runOnStart, _ := rd.Get("run_on_start").(bool)

0 commit comments

Comments
 (0)