|
| 1 | +--- |
| 2 | +# generated by https://github.com/hashicorp/terraform-plugin-docs |
| 3 | +page_title: "coder_parameter Data Source - terraform-provider-coder" |
| 4 | +subcategory: "" |
| 5 | +description: |- |
| 6 | + Use this data source to configure editable options for workspaces. |
| 7 | +--- |
| 8 | + |
| 9 | +# coder_parameter (Data Source) |
| 10 | + |
| 11 | +Use this data source to configure editable options for workspaces. |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | +<!-- schema generated by tfplugindocs --> |
| 16 | +## Schema |
| 17 | + |
| 18 | +### Required |
| 19 | + |
| 20 | +- `name` (String) The name of the parameter as it will appear in the interface. If this is changed, developers will be re-prompted for a new value. |
| 21 | + |
| 22 | +### Optional |
| 23 | + |
| 24 | +- `default` (String) A default value for the parameter. |
| 25 | +- `description` (String) Describe what this parameter does. |
| 26 | +- `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>"`. |
| 27 | +- `mutable` (Boolean) Whether this value can be changed after workspace creation. This can be destructive for values like region, so use with caution! |
| 28 | +- `option` (Block List, Max: 64) Each "option" block defines a value for a user to select from. (see [below for nested schema](#nestedblock--option)) |
| 29 | +- `type` (String) The type of this parameter. Must be one of: "number", "string", or "bool". |
| 30 | +- `validation` (Block List, Max: 1) Validate the input of a parameter. (see [below for nested schema](#nestedblock--validation)) |
| 31 | + |
| 32 | +### Read-Only |
| 33 | + |
| 34 | +- `id` (String) The ID of this resource. |
| 35 | +- `value` (String) The output value of the parameter. |
| 36 | + |
| 37 | +<a id="nestedblock--option"></a> |
| 38 | +### Nested Schema for `option` |
| 39 | + |
| 40 | +Required: |
| 41 | + |
| 42 | +- `name` (String) The display name of this value in the UI. |
| 43 | +- `value` (String) The value of this option set on the parameter if selected. |
| 44 | + |
| 45 | +Optional: |
| 46 | + |
| 47 | +- `description` (String) Describe what selecting this value does. |
| 48 | +- `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>"`. |
| 49 | + |
| 50 | + |
| 51 | +<a id="nestedblock--validation"></a> |
| 52 | +### Nested Schema for `validation` |
| 53 | + |
| 54 | +Optional: |
| 55 | + |
| 56 | +- `max` (Number) The maximum of a number parameter. |
| 57 | +- `min` (Number) The minimum of a number parameter. |
| 58 | +- `regex` (String) A regex for the input parameter to match against. |
| 59 | + |
| 60 | + |
0 commit comments