Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 972a26f

Browse files
committedJul 2, 2024·
more formatting
1 parent 19b8b48 commit 972a26f

File tree

9 files changed

+38
-38
lines changed

9 files changed

+38
-38
lines changed
 

‎docs/data-sources/parameter.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ data "coder_parameter" "home_volume_size" {
145145
- `description` (String) Describe what this parameter does.
146146
- `display_name` (String) The displayed name of the parameter as it will appear in the interface.
147147
- `ephemeral` (Boolean) The value of an ephemeral parameter will not be preserved between consecutive workspace builds.
148-
- `icon` (String) A URL to an icon that will display in the dashboard. View built-in icons [here](https://github.com/coder/coder/tree/main/site/static/icon). Use a built-in icon with `data.coder_workspace.me.access_url + "/icon/<path>"`.
148+
- `icon` (String) A URL to an icon that will display in the dashboard. View built-in icons [here](https://github.com/coder/coder/tree/main/site/static/icon). Use a built-in icon with `"${data.coder_workspace.me.access_url}/icon/<path>"`.
149149
- `mutable` (Boolean) Whether this value can be changed after workspace creation. This can be destructive for values like region, so use with caution!
150150
- `option` (Block List, Max: 64) Each `option` block defines a value for a user to select from. (see [below for nested schema](#nestedblock--option))
151151
- `order` (Number) The order determines the position of a template parameter in the UI/CLI presentation. The lowest order is shown first and parameters with equal order are sorted by name (ascending order).

‎docs/resources/agent.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -66,24 +66,24 @@ resource "kubernetes_pod" "dev" {
6666

6767
### Required
6868

69-
- `arch` (String) The architecture the agent will run on. Must be one of: `amd64`, `armv7`, `arm64`.
70-
- `os` (String) The operating system the agent will run on. Must be one of: `linux`, `darwin`, or `windows`.
69+
- `arch` (String) The architecture the agent will run on. Must be one of: `"amd64"`, `"armv7"`, `"arm64"`.
70+
- `os` (String) The operating system the agent will run on. Must be one of: `"linux"`, `"darwin"`, or `"windows"`.
7171

7272
### Optional
7373

74-
- `auth` (String) The authentication type the agent will use. Must be one of: `token`, `google-instance-identity`, `aws-instance-identity`, `azure-instance-identity`.
74+
- `auth` (String) The authentication type the agent will use. Must be one of: `"token"`, `"google-instance-identity"`, `"aws-instance-identity"`, `"azure-instance-identity"`.
7575
- `connection_timeout` (Number) Time in seconds until the agent is marked as timed out when a connection with the server cannot be established. A value of zero never marks the agent as timed out.
76-
- `dir` (String) The starting directory when a user creates a shell session. Defaults to `$HOME`.
76+
- `dir` (String) The starting directory when a user creates a shell session. Defaults to `"$HOME"`.
7777
- `display_apps` (Block Set, Max: 1) The list of built-in apps to display in the agent bar. (see [below for nested schema](#nestedblock--display_apps))
7878
- `env` (Map of String) A mapping of environment variables to set inside the workspace.
79-
- `login_before_ready` (Boolean, **Deprecated**: Configure startup_script_behavior instead. This attribute will be removed in a future version of the provider.) 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 `startup_script` is done and has exited. When enabled, users may see an incomplete workspace when logging in.
79+
- `login_before_ready` (Boolean, **Deprecated**: Configure `startup_script_behavior` instead. This attribute will be removed in a future version of the provider.) 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 `startup_script` is done and has exited. When enabled, users may see an incomplete workspace when logging in.
8080
- `metadata` (Block List) Each `metadata` block defines a single item consisting of a key/value pair. This feature is in alpha and may break in future releases. (see [below for nested schema](#nestedblock--metadata))
81-
- `motd_file` (String) The path to a file within the workspace containing a message to display to users when they login via SSH. A typical value would be `/etc/motd`.
81+
- `motd_file` (String) The path to a file within the workspace containing a message to display to users when they login via SSH. A typical value would be `"/etc/motd"`.
8282
- `order` (Number) The order determines the position of agents in the UI presentation. The lowest order is shown first and agents with equal order are sorted by name (ascending order).
8383
- `shutdown_script` (String) A script to run before the agent is stopped. The script should exit when it is done to signal that the workspace can be stopped. This option is an alias for defining a `coder_script` resource with `run_on_stop` set to `true`.
8484
- `shutdown_script_timeout` (Number, **Deprecated**: This feature is deprecated and has no effect. This attribute will be removed in a future version of the provider.) Time in seconds until the agent lifecycle status is marked as timed out during shutdown, this happens when the shutdown script has not completed (exited) in the given time.
8585
- `startup_script` (String) A script to run after the agent starts. The script should exit when it is done to signal that the agent is ready. This option is an alias for defining a `coder_script` resource with `run_on_start` set to `true`.
86-
- `startup_script_behavior` (String) This option sets the behavior of the `startup_script`. When set to `blocking`, the `startup_script` must exit before the workspace is ready. When set to `non-blocking`, the `startup_script` may run in the background and the workspace will be ready immediately. Default is `non-blocking`, although `blocking` is recommended. This option is an alias for defining a `coder_script` resource with `start_blocks_login` set to rue (blocking).
86+
- `startup_script_behavior` (String) This option sets the behavior of the `startup_script`. When set to `"blocking"`, the `startup_script` must exit before the workspace is ready. When set to `"non-blocking"`, the `startup_script` may run in the background and the workspace will be ready immediately. Default is `"non-blocking"`, although `"blocking"` is recommended. This option is an alias for defining a `coder_script` resource with `start_blocks_login` set to `true` (blocking).
8787
- `startup_script_timeout` (Number, **Deprecated**: This feature is deprecated and has no effect. This attribute will be removed in a future version of the provider.) Time in seconds until the agent lifecycle status is marked as timed out during start, this happens when the startup script has not completed (exited) in the given time.
8888
- `troubleshooting_url` (String) A URL to a document with instructions for troubleshooting problems with the agent.
8989

‎docs/resources/agent_instance.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
page_title: "coder_agent_instance Resource - terraform-provider-coder"
44
subcategory: ""
55
description: |-
6-
Use this resource to associate an instance ID with an agent for zero-trust authentication. This association is done automatically for google_compute_instance, aws_instance, azurerm_linux_virtual_machine, and azurerm_windows_virtual_machine resources.
6+
Use this resource to associate an instance ID with an agent for zero-trust authentication. This association is done automatically for "google_compute_instance", "aws_instance", "azurerm_linux_virtual_machine", and "azurerm_windows_virtual_machine" resources.
77
---
88

99
# coder_agent_instance (Resource)
1010

11-
Use this resource to associate an instance ID with an agent for zero-trust authentication. This association is done automatically for `google_compute_instance`, `aws_instance`, `azurerm_linux_virtual_machine`, and `azurerm_windows_virtual_machine` resources.
11+
Use this resource to associate an instance ID with an agent for zero-trust authentication. This association is done automatically for `"google_compute_instance"`, `"aws_instance"`, `"azurerm_linux_virtual_machine"`, and `"azurerm_windows_virtual_machine"` resources.
1212

1313
## Example Usage
1414

‎docs/resources/app.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@ resource "coder_app" "vim" {
6363
- `display_name` (String) A display name to identify the app. Defaults to the slug.
6464
- `external` (Boolean) Specifies whether `url` is opened on the client machine instead of proxied through the workspace.
6565
- `healthcheck` (Block Set, Max: 1) HTTP health checking to determine the application readiness. (see [below for nested schema](#nestedblock--healthcheck))
66-
- `icon` (String) A URL to an icon that will display in the dashboard. View built-in icons here: https://github.com/coder/coder/tree/main/site/static/icon. Use a built-in icon with `data.coder_workspace.me.access_url + "/icon/<path>"`.
66+
- `icon` (String) A URL to an icon that will display in the dashboard. View built-in icons here: https://github.com/coder/coder/tree/main/site/static/icon. Use a built-in icon with `"${data.coder_workspace.me.access_url}/icon/<path>"`.
6767
- `name` (String, **Deprecated**: `name` on apps is deprecated, use `display_name` instead) A display name to identify the app.
6868
- `order` (Number) The order determines the position of app in the UI presentation. The lowest order is shown first and apps with equal order are sorted by name (ascending order).
6969
- `relative_path` (Boolean, **Deprecated**: `relative_path` on apps is deprecated, use `subdomain` instead.) Specifies whether the URL will be accessed via a relative path or wildcard. Use if wildcard routing is unavailable. Defaults to `true`.
70-
- `share` (String) Determines the level which the application is shared at. Valid levels are `owner` (default), `authenticated` and `public`. Level `owner` disables sharing on the app, so only the workspace owner can access it. Level `authenticated` shares the app with all authenticated users. Level `public` shares it with any user, including unauthenticated users. Permitted application sharing levels can be configured site-wide via a flag on `coder server` (Enterprise only).
71-
- `subdomain` (Boolean) Determines whether the app will be accessed via it's own subdomain or whether it will be accessed via a path on Coder. If wildcards have not been setup by the administrator then apps with `subdomain` set to true will not be accessible. Defaults to false.
70+
- `share` (String) Determines the level which the application is shared at. Valid levels are `"owner"` (default), `"authenticated"` and `"public"`. Level `"owner"` disables sharing on the app, so only the workspace owner can access it. Level `"authenticated"` shares the app with all authenticated users. Level `"public"` shares it with any user, including unauthenticated users. Permitted application sharing levels can be configured site-wide via a flag on `coder server` (Enterprise only).
71+
- `subdomain` (Boolean) Determines whether the app will be accessed via it's own subdomain or whether it will be accessed via a path on Coder. If wildcards have not been setup by the administrator then apps with `subdomain` set to `true` will not be accessible. Defaults to `false`.
7272
- `url` (String) An external url if `external=true` or a URL to be proxied to from inside the workspace. This should be of the form `http://localhost:PORT[/SUBPATH]`. Either `command` or `url` may be specified, but not both.
7373

7474
### Read-Only

‎provider/agent.go

+10-10
Original file line numberDiff line numberDiff line change
@@ -92,22 +92,22 @@ func agentResource() *schema.Resource {
9292
Type: schema.TypeString,
9393
ForceNew: true,
9494
Required: true,
95-
Description: "The architecture the agent will run on. Must be one of: `amd64`, `armv7`, `arm64`.",
95+
Description: "The architecture the agent will run on. Must be one of: `\"amd64\"`, `\"armv7\"`, `\"arm64\"`.",
9696
ValidateFunc: validation.StringInSlice([]string{"amd64", "armv7", "arm64"}, false),
9797
},
9898
"auth": {
9999
Type: schema.TypeString,
100100
Default: "token",
101101
ForceNew: true,
102102
Optional: true,
103-
Description: "The authentication type the agent will use. Must be one of: `token`, `google-instance-identity`, `aws-instance-identity`, `azure-instance-identity`.",
103+
Description: "The authentication type the agent will use. Must be one of: `\"token\"`, `\"google-instance-identity\"`, `\"aws-instance-identity\"`, `\"azure-instance-identity\"`.",
104104
ValidateFunc: validation.StringInSlice([]string{"token", "google-instance-identity", "aws-instance-identity", "azure-instance-identity"}, false),
105105
},
106106
"dir": {
107107
Type: schema.TypeString,
108108
ForceNew: true,
109109
Optional: true,
110-
Description: "The starting directory when a user creates a shell session. Defaults to `$HOME`.",
110+
Description: "The starting directory when a user creates a shell session. Defaults to `\"$HOME\"`.",
111111
},
112112
"env": {
113113
ForceNew: true,
@@ -119,7 +119,7 @@ func agentResource() *schema.Resource {
119119
Type: schema.TypeString,
120120
ForceNew: true,
121121
Required: true,
122-
Description: "The operating system the agent will run on. Must be one of: `linux`, `darwin`, or `windows`.",
122+
Description: "The operating system the agent will run on. Must be one of: `\"linux\"`, `\"darwin\"`, or `\"windows\"`.",
123123
ValidateFunc: validation.StringInSlice([]string{"linux", "darwin", "windows"}, false),
124124
},
125125
"startup_script": {
@@ -177,7 +177,7 @@ func agentResource() *schema.Resource {
177177
Type: schema.TypeString,
178178
ForceNew: true,
179179
Optional: true,
180-
Description: "The path to a file within the workspace containing a message to display to users when they login via SSH. A typical value would be `/etc/motd`.",
180+
Description: "The path to a file within the workspace containing a message to display to users when they login via SSH. A typical value would be `\"/etc/motd\"`.",
181181
},
182182
"login_before_ready": {
183183
// Note: When this is removed, "startup_script_behavior" should
@@ -187,7 +187,7 @@ func agentResource() *schema.Resource {
187187
ForceNew: true,
188188
Optional: true,
189189
Description: "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 `startup_script` is done and has exited. When enabled, users may see an incomplete workspace when logging in.",
190-
Deprecated: "Configure startup_script_behavior instead. This attribute will be removed in a future version of the provider.",
190+
Deprecated: "Configure `startup_script_behavior` instead. This attribute will be removed in a future version of the provider.",
191191
ConflictsWith: []string{"startup_script_behavior"},
192192
},
193193
"startup_script_behavior": {
@@ -200,7 +200,7 @@ func agentResource() *schema.Resource {
200200
Type: schema.TypeString,
201201
ForceNew: true,
202202
Optional: true,
203-
Description: "This option sets the behavior of the `startup_script`. When set to `blocking`, the `startup_script` must exit before the workspace is ready. When set to `non-blocking`, the `startup_script` may run in the background and the workspace will be ready immediately. Default is `non-blocking`, although `blocking` is recommended. This option is an alias for defining a `coder_script` resource with `start_blocks_login` set to rue (blocking).",
203+
Description: "This option sets the behavior of the `startup_script`. When set to `\"blocking\"`, the `startup_script` must exit before the workspace is ready. When set to `\"non-blocking\"`, the `startup_script` may run in the background and the workspace will be ready immediately. Default is `\"non-blocking\"`, although `\"blocking\"` is recommended. This option is an alias for defining a `coder_script` resource with `start_blocks_login` set to `true` (blocking).",
204204
ValidateFunc: validation.StringInSlice([]string{"blocking", "non-blocking"}, false),
205205
ConflictsWith: []string{"login_before_ready"},
206206
},
@@ -313,9 +313,9 @@ func agentResource() *schema.Resource {
313313
func agentInstanceResource() *schema.Resource {
314314
return &schema.Resource{
315315
Description: "Use this resource to associate an instance ID with an agent for zero-trust " +
316-
"authentication. This association is done automatically for `google_compute_instance`, " +
317-
"`aws_instance`, `azurerm_linux_virtual_machine`, and " +
318-
"`azurerm_windows_virtual_machine` resources.",
316+
"authentication. This association is done automatically for `\"google_compute_instance\"`, " +
317+
"`\"aws_instance\"`, `\"azurerm_linux_virtual_machine\"`, and " +
318+
"`\"azurerm_windows_virtual_machine\"` resources.",
319319
CreateContext: func(c context.Context, resourceData *schema.ResourceData, i interface{}) diag.Diagnostics {
320320
resourceData.SetId(uuid.NewString())
321321
return nil

‎provider/app.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ func appResource() *schema.Resource {
5858
Type: schema.TypeString,
5959
Description: "A URL to an icon that will display in the dashboard. View built-in " +
6060
"icons here: https://github.com/coder/coder/tree/main/site/static/icon. Use a " +
61-
"built-in icon with `data.coder_workspace.me.access_url + \"/icon/<path>\"`.",
61+
"built-in icon with `\"${data.coder_workspace.me.access_url}/icon/<path>\"`.",
6262
ForceNew: true,
6363
Optional: true,
6464
ValidateFunc: func(i interface{}, s string) ([]string, []error) {
@@ -109,7 +109,7 @@ func appResource() *schema.Resource {
109109
Description: "Determines whether the app will be accessed via it's own " +
110110
"subdomain or whether it will be accessed via a path on Coder. If " +
111111
"wildcards have not been setup by the administrator then apps with " +
112-
"`subdomain` set to true will not be accessible. Defaults to false.",
112+
"`subdomain` set to `true` will not be accessible. Defaults to `false`.",
113113
ForceNew: true,
114114
Optional: true,
115115
},
@@ -125,11 +125,11 @@ func appResource() *schema.Resource {
125125
"share": {
126126
Type: schema.TypeString,
127127
Description: "Determines the level which the application " +
128-
"is shared at. Valid levels are `owner` (default), " +
129-
"`authenticated` and `public`. Level `owner` disables " +
128+
"is shared at. Valid levels are `\"owner\"` (default), " +
129+
"`\"authenticated\"` and `\"public\"`. Level `\"owner\"` disables " +
130130
"sharing on the app, so only the workspace owner can " +
131-
"access it. Level `authenticated` shares the app with " +
132-
"all authenticated users. Level `public` shares it with " +
131+
"access it. Level `\"authenticated\"` shares the app with " +
132+
"all authenticated users. Level `\"public\"` shares it with " +
133133
"any user, including unauthenticated users. Permitted " +
134134
"application sharing levels can be configured site-wide " +
135135
"via a flag on `coder server` (Enterprise only).",

‎provider/metadata.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ func metadataResource() *schema.Resource {
5151
"icon": {
5252
Type: schema.TypeString,
5353
Description: "A URL to an icon that will display in the dashboard. View built-in " +
54-
"icons here: https://github.com/coder/coder/tree/main/site/static/icon. Use a " +
55-
"built-in icon with `data.coder_workspace.me.access_url + \"/icon/<path>\"`.",
54+
"icons [here](https://github.com/coder/coder/tree/main/site/static/icon). Use a " +
55+
"built-in icon with `\"${data.coder_workspace.me.access_url}/icon/<path>\"`.",
5656
ForceNew: true,
5757
Optional: true,
5858
ValidateFunc: func(i interface{}, s string) ([]string, []error) {

‎provider/parameter.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ func parameterDataSource() *schema.Resource {
221221
Type: schema.TypeString,
222222
Description: "A URL to an icon that will display in the dashboard. View built-in " +
223223
"icons [here](https://github.com/coder/coder/tree/main/site/static/icon). Use a " +
224-
"built-in icon with `data.coder_workspace.me.access_url + \"/icon/<path>\"`.",
224+
"built-in icon with `\"${data.coder_workspace.me.access_url}/icon/<path>\"`.",
225225
ForceNew: true,
226226
Optional: true,
227227
ValidateFunc: func(i interface{}, s string) ([]string, []error) {
@@ -261,8 +261,8 @@ func parameterDataSource() *schema.Resource {
261261
"icon": {
262262
Type: schema.TypeString,
263263
Description: "A URL to an icon that will display in the dashboard. View built-in " +
264-
"icons here: https://github.com/coder/coder/tree/main/site/static/icon. Use a " +
265-
"built-in icon with `data.coder_workspace.me.access_url + \"/icon/<path>\"`.",
264+
"icons [here](https://github.com/coder/coder/tree/main/site/static/icon). Use a " +
265+
"built-in icon with `\"${data.coder_workspace.me.access_url}/icon/<path>\"`.",
266266
ForceNew: true,
267267
Optional: true,
268268
ValidateFunc: func(i interface{}, s string) ([]string, []error) {

‎provider/script.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ func scriptResource() *schema.Resource {
2626
cron, _ := rd.Get("cron").(string)
2727

2828
if !runOnStart && !runOnStop && cron == "" {
29-
return diag.Errorf("at least one of \"run_on_start\", \"run_on_stop\", or \"cron\" must be set")
29+
return diag.Errorf(`at least one of "run_on_start", "run_on_stop", or "cron" must be set`)
3030
}
3131
if !runOnStart && startBlocksLogin {
32-
return diag.Errorf("\"start_blocks_login\" can only be set if \"run_on_start\" is \"true\"")
32+
return diag.Errorf(`"start_blocks_login" can only be set if "run_on_start" is "true"`)
3333
}
3434
return nil
3535
},
@@ -59,8 +59,8 @@ func scriptResource() *schema.Resource {
5959
ForceNew: true,
6060
Optional: true,
6161
Description: "A URL to an icon that will display in the dashboard. View built-in " +
62-
"icons here: https://github.com/coder/coder/tree/main/site/static/icon. Use a " +
63-
"built-in icon with `data.coder_workspace.me.access_url + \"/icon/<path>\"`.",
62+
"icons [here](https://github.com/coder/coder/tree/main/site/static/icon). Use a " +
63+
"built-in icon with `\"${data.coder_workspace.me.access_url}/icon/<path>\"`.",
6464
},
6565
"script": {
6666
ForceNew: true,

0 commit comments

Comments
 (0)
Please sign in to comment.