Skip to content

Commit 428921c

Browse files
authored
docs: improve docs by using code-styled markdown
1 parent 7c88401 commit 428921c

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

provider/agent.go

+16-16
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,12 +119,12 @@ 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": {
126126
ForceNew: true,
127-
Description: `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.`,
127+
Description: "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`.",
128128
Type: schema.TypeString,
129129
Optional: true,
130130
},
@@ -141,7 +141,7 @@ func agentResource() *schema.Resource {
141141
Type: schema.TypeString,
142142
ForceNew: true,
143143
Optional: true,
144-
Description: `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.`,
144+
Description: "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`.",
145145
},
146146
"shutdown_script_timeout": {
147147
Type: schema.TypeInt,
@@ -155,7 +155,7 @@ func agentResource() *schema.Resource {
155155
"token": {
156156
ForceNew: true,
157157
Sensitive: true,
158-
Description: `Set the environment variable "CODER_AGENT_TOKEN" with this token to authenticate an agent.`,
158+
Description: "Set the environment variable `CODER_AGENT_TOKEN` with this token to authenticate an agent.",
159159
Type: schema.TypeString,
160160
Computed: true,
161161
},
@@ -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
@@ -186,7 +186,7 @@ func agentResource() *schema.Resource {
186186
Default: true,
187187
ForceNew: true,
188188
Optional: true,
189-
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.",
189+
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.",
190190
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
},
@@ -200,13 +200,13 @@ 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 true (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 rue (blocking).",
204204
ValidateFunc: validation.StringInSlice([]string{"blocking", "non-blocking"}, false),
205205
ConflictsWith: []string{"login_before_ready"},
206206
},
207207
"metadata": {
208208
Type: schema.TypeList,
209-
Description: "Each \"metadata\" block defines a single item consisting of a key/value pair. This feature is in alpha and may break in future releases.",
209+
Description: "Each `metadata` block defines a single item consisting of a key/value pair. This feature is in alpha and may break in future releases.",
210210
ForceNew: true,
211211
Optional: true,
212212
Elem: &schema.Resource{
@@ -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
@@ -329,14 +329,14 @@ func agentInstanceResource() *schema.Resource {
329329
Schema: map[string]*schema.Schema{
330330
"agent_id": {
331331
Type: schema.TypeString,
332-
Description: `The "id" property of a "coder_agent" resource to associate with.`,
332+
Description: "The `id` property of a `coder_agent` resource to associate with.",
333333
ForceNew: true,
334334
Required: true,
335335
},
336336
"instance_id": {
337337
ForceNew: true,
338338
Required: true,
339-
Description: `The instance identifier of a provisioned resource.`,
339+
Description: "The instance identifier of a provisioned resource.",
340340
Type: schema.TypeString,
341341
},
342342
},

0 commit comments

Comments
 (0)