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

Commit18bfe55

Browse files
authored
Refactor documentation for parameter types and icons (#405)
1 parent28dae7f commit18bfe55

File tree

8 files changed

+24
-21
lines changed

8 files changed

+24
-21
lines changed

‎docs/data-sources/parameter.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,13 @@ 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-
-`form_type` (String) The type of this parameter. Must be one of:[radio,slider,input,dropdown,checkbox,switch,multi-select,tag-select,textarea,error].
148+
-`form_type` (String) The type of this parameter. Must be one of:`"radio"`,`"slider"`,`"input"`,`"dropdown"`,`"checkbox"`,`"switch"`,`"multi-select"`,`"tag-select"`,`"textarea"`,`"error"`.
149149
-`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>"`.
150150
-`mutable` (Boolean) Whether this value can be changed after workspace creation. This can be destructive for values like region, so use with caution!
151151
-`option` (Block List) Each`option` block defines a value for a user to select from. (see[below for nested schema](#nestedblock--option))
152152
-`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).
153153
-`styling` (String) JSON encoded string containing the metadata for controlling the appearance of this parameter in the UI. This option is purely cosmetic and does not affect the function of the parameter in terraform.
154-
-`type` (String) The type of this parameter. Must be one of:`"number"`,`"string"`,`"bool"`, or`"list(string)"`.
154+
-`type` (String) The type of this parameter. Must be one of:`"string"`,`"number"`,`"bool"`,`"list(string)"`.
155155
-`validation` (Block List, Max: 1) Validate the input of a parameter. (see[below for nested schema](#nestedblock--validation))
156156

157157
###Read-Only
@@ -179,13 +179,13 @@ Optional:
179179

180180
Optional:
181181

182-
-`error` (String) An error message to display if the value breaks the validation rules. The following placeholders are supported: {max},{min}, and {value}.
183-
-`max` (Number) The maximum of a number parameter.
184-
-`min` (Number) The minimum of a number parameter.
182+
-`error` (String) An error message to display if the value breaks the validation rules. The following placeholders are supported:`{max}`,`{min}`, and`{value}`.
183+
-`max` (Number) The maximumvalueof a number parameter.
184+
-`min` (Number) The minimumvalueof a number parameter.
185185
-`monotonic` (String) Number monotonicity, either increasing or decreasing.
186186
-`regex` (String) A regex for the input parameter to match against.
187187

188188
Read-Only:
189189

190-
-`max_disabled` (Boolean) Helper field to check if max is present
191-
-`min_disabled` (Boolean) Helper field to check if min is present
190+
-`max_disabled` (Boolean) Helper field to check if`max` is present
191+
-`min_disabled` (Boolean) Helper field to check if`min` is present

‎docs/resources/agent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ resource "kubernetes_pod" "dev" {
7272

7373
###Optional
7474

75-
-`api_key_scope` (String) Controls what API routes the agent token can access. Options:'all' (full access) or'no_user_data' (blocks /external-auth,/gitsshkey, and /gitauth routes)
75+
-`api_key_scope` (String) Controls what API routes the agent token can access. Options:`all` (full access) or`no_user_data` (blocks`/external-auth`,`/gitsshkey`, and`/gitauth` routes)
7676
-`auth` (String) The authentication type the agent will use. Must be one of:`"token"`,`"google-instance-identity"`,`"aws-instance-identity"`,`"azure-instance-identity"`.
7777
-`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.
7878
-`dir` (String) The starting directory when a user creates a shell session. Defaults to`"$HOME"`.

‎docs/resources/app.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ resource "coder_app" "vim" {
6666
-`group` (String) The name of a group that this app belongs to.
6767
-`healthcheck` (Block Set, Max: 1) HTTP health checking to determine the application readiness. (see[below for nested schema](#nestedblock--healthcheck))
6868
-`hidden` (Boolean) Determines if the app is visible in the UI (minimum Coder version: v2.16).
69-
-`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>"`.
69+
-`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>"`.
7070
-`open_in` (String) Determines where the app will be opened. Valid values are`"tab"` and`"slim-window" (default)`.`"tab"` opens in a new tab in the same browser window.`"slim-window"` opens a new browser window without navigation controls.
7171
-`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).
7272
-`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).

‎docs/resources/devcontainer.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@
33
page_title:"coder_devcontainer Resource - terraform-provider-coder"
44
subcategory:""
55
description:|-
6-
Define a Dev Container the agent should know of and attempt to autostart (minimum Coder version: v2.21).
6+
Define a Dev Container the agent should know of and attempt to autostart.
7+
-> This resource is only available in Coder v2.21 and later.
78
---
89

910
#coder_devcontainer (Resource)
1011

11-
Define a Dev Container the agent should know of and attempt to autostart (minimum Coder version: v2.21).
12+
Define a Dev Container the agent should know of and attempt to autostart.
13+
14+
-> This resource is only available in Coder v2.21 and later.
1215

1316

1417

‎provider/agent.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func agentResource() *schema.Resource {
8585
Optional:true,
8686
Default:"all",
8787
ForceNew:true,
88-
Description:"Controls what API routes the agent token can access. Options:'all' (full access) or'no_user_data' (blocks /external-auth,/gitsshkey, and /gitauth routes)",
88+
Description:"Controls what API routes the agent token can access. Options:`all` (full access) or`no_user_data` (blocks`/external-auth`, `/gitsshkey`, and`/gitauth` routes)",
8989
ValidateFunc:validation.StringInSlice([]string{
9090
"all",
9191
"no_user_data",

‎provider/app.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ func appResource() *schema.Resource {
8888
"icon": {
8989
Type:schema.TypeString,
9090
Description:"A URL to an icon that will display in the dashboard. View built-in "+
91-
"icons here:https://github.com/coder/coder/tree/main/site/static/icon. Use a "+
91+
"icons[here](https://github.com/coder/coder/tree/main/site/static/icon). Use a "+
9292
"built-in icon with `\"${data.coder_workspace.me.access_url}/icon/<path>\"`.",
9393
ForceNew:true,
9494
Optional:true,

‎provider/devcontainer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ func devcontainerResource() *schema.Resource {
1313
return&schema.Resource{
1414
SchemaVersion:1,
1515

16-
Description:"Define a Dev Container the agent should know of and attempt to autostart (minimum Coder version:v2.21).",
16+
Description:"Define a Dev Container the agent should know of and attempt to autostart.\n\n-> This resource is only available in Coderv2.21 and later.",
1717
CreateContext:func(_ context.Context,rd*schema.ResourceData,_interface{}) diag.Diagnostics {
1818
rd.SetId(uuid.NewString())
1919

‎provider/parameter.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -191,14 +191,14 @@ func parameterDataSource() *schema.Resource {
191191
Default:"string",
192192
Optional:true,
193193
ValidateFunc:validation.StringInSlice(toStrings(OptionTypes()),false),
194-
Description:"The type of this parameter. Must be one of: `\"number\"`, `\"string\"`, `\"bool\"`,or`\"list(string)\"`.",
194+
Description:fmt.Sprintf("The type of this parameter. Must be one of: `\"%s\"`.",strings.Join(toStrings(OptionTypes()),"\"`, `\"")),
195195
},
196196
"form_type": {
197197
Type:schema.TypeString,
198198
Default:ParameterFormTypeDefault,
199199
Optional:true,
200200
ValidateFunc:validation.StringInSlice(toStrings(ParameterFormTypes()),false),
201-
Description:fmt.Sprintf("The type of this parameter. Must be one of:[%s].",strings.Join(toStrings(ParameterFormTypes()),",")),
201+
Description:fmt.Sprintf("The type of this parameter. Must be one of:`\"%s\"`.",strings.Join(toStrings(ParameterFormTypes()),"\"`, `\"")),
202202
},
203203
"styling": {
204204
Type:schema.TypeString,
@@ -286,22 +286,22 @@ func parameterDataSource() *schema.Resource {
286286
"min": {
287287
Type:schema.TypeInt,
288288
Optional:true,
289-
Description:"The minimum of a number parameter.",
289+
Description:"The minimumvalueof a number parameter.",
290290
},
291291
"min_disabled": {
292292
Type:schema.TypeBool,
293293
Computed:true,
294-
Description:"Helper field to check if min is present",
294+
Description:"Helper field to check if`min` is present",
295295
},
296296
"max": {
297297
Type:schema.TypeInt,
298298
Optional:true,
299-
Description:"The maximum of a number parameter.",
299+
Description:"The maximumvalueof a number parameter.",
300300
},
301301
"max_disabled": {
302302
Type:schema.TypeBool,
303303
Computed:true,
304-
Description:"Helper field to check if max is present",
304+
Description:"Helper field to check if`max` is present",
305305
},
306306
"monotonic": {
307307
Type:schema.TypeString,
@@ -317,7 +317,7 @@ func parameterDataSource() *schema.Resource {
317317
"error": {
318318
Type:schema.TypeString,
319319
Optional:true,
320-
Description:"An error message to display if the value breaks the validation rules. The following placeholders are supported: {max},{min}, and {value}.",
320+
Description:"An error message to display if the value breaks the validation rules. The following placeholders are supported:`{max}`, `{min}`, and`{value}`.",
321321
},
322322
},
323323
},

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp