Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit778999a

Browse files
committed
feat: addcoder_script
Seecoder/coder#9287I decided to drop the `agent` portion from the name. It seemed inconsistentwith `coder_app`.
1 parentf0da725 commit778999a

File tree

11 files changed

+105
-16
lines changed

11 files changed

+105
-16
lines changed

‎docs/data-sources/git_auth.md‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,3 @@ EOF
4646
###Read-Only
4747

4848
-`access_token` (String) The access token returned by the git authentication provider. This can be used to pre-authenticate command-line tools.
49-
50-

‎docs/data-sources/parameter.md‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,3 @@ Optional:
6161
-`min` (Number) The minimum of a number parameter.
6262
-`monotonic` (String) Number monotonicity, either increasing or decreasing.
6363
-`regex` (String) A regex for the input parameter to match against.
64-
65-

‎docs/data-sources/provisioner.md‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,3 @@ Use this data source to get information about the Coder provisioner.
2020
-`arch` (String) The architecture of the host. This exposes`runtime.GOARCH` (seehttps://pkg.go.dev/runtime#pkg-constants).
2121
-`id` (String) The ID of this resource.
2222
-`os` (String) The operating system of the host. This exposes`runtime.GOOS` (seehttps://pkg.go.dev/runtime#pkg-constants).
23-
24-

‎docs/data-sources/workspace.md‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,3 @@ resource "kubernetes_pod" "dev" {
3636
-`owner_oidc_access_token` (String) A valid OpenID Connect access token of the workspace owner. This is only available if the workspace owner authenticated with OpenID Connect. If a valid token cannot be obtained, this value will be an empty string.
3737
-`start_count` (Number) A computed count based on "transition" state. If "start", count will equal 1.
3838
-`transition` (String) Either "start" or "stop". Use this to start/stop resources with "count".
39-
40-

‎docs/resources/agent.md‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,3 @@ resource "kubernetes_pod" "dev" {
6363
-`id` (String) The ID of this resource.
6464
-`init_script` (String) Run this script on startup of an instance to initialize the agent.
6565
-`token` (String, Sensitive) Set the environment variable "CODER_AGENT_TOKEN" with this token to authenticate an agent.
66-
67-

‎docs/resources/agent_instance.md‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,3 @@ resource "coder_agent_instance" "dev" {
4040
###Read-Only
4141

4242
-`id` (String) The ID of this resource.
43-
44-

‎docs/resources/app.md‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,5 +90,3 @@ Required:
9090
-`interval` (Number) Duration in seconds to wait between healthcheck requests.
9191
-`threshold` (Number) Number of consecutive heathcheck failures before returning an unhealthy status.
9292
-`url` (String) HTTP address used determine the application readiness. A successful health check is a HTTP response code less than 500 returned before healthcheck.interval seconds.
93-
94-

‎docs/resources/metadata.md‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,5 +80,3 @@ Optional:
8080
Read-Only:
8181

8282
-`is_null` (Boolean)
83-
84-

‎docs/resources/script.md‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title:"coder_script Resource - terraform-provider-coder"
4+
subcategory:""
5+
description:|-
6+
Use this resource to run a script from an agent.
7+
---
8+
9+
#coder_script (Resource)
10+
11+
Use this resource to run a script from an agent.
12+
13+
14+
15+
<!-- schema generated by tfplugindocs-->
16+
##Schema
17+
18+
###Required
19+
20+
-`agent_id` (String) The "id" property of a "coder_agent" resource to associate with.
21+
-`script` (String) The script to run.
22+
23+
###Optional
24+
25+
-`login_before_ready` (Boolean) This option defines whether or not the user can (by default) login to the workspace before it is ready. Ready means that e.g. the script is done and has exited. When enabled, users may see an incomplete workspace when logging in.
26+
-`run_on_start` (Boolean) This option defines whether or not the script should run when the agent starts.
27+
-`run_on_stop` (Boolean) This option defines whether or not the script should run when the agent stops.
28+
-`schedule` (String) The schedule to run the script on. This is a cron expression.
29+
-`timeout` (Number) Time in seconds until the agent lifecycle status is marked as timed out, this happens when the script has not completed (exited) in the given time.
30+
31+
###Read-Only
32+
33+
-`id` (String) The ID of this resource.

‎provider/provider.go‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ func New() *schema.Provider {
7676
"coder_agent_instance":agentInstanceResource(),
7777
"coder_app":appResource(),
7878
"coder_metadata":metadataResource(),
79+
"coder_script":scriptResource(),
7980
},
8081
}
8182
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp