Skip to content

Latest commit

 

History

History
69 lines (47 loc) · 3.12 KB

File metadata and controls

69 lines (47 loc) · 3.12 KB
page_title subcategory description
coder_parameter Data Source - terraform-provider-coder
Use this data source to configure editable options for workspaces.

coder_parameter (Data Source)

Use this data source to configure editable options for workspaces.

Schema

Required

  • name (String) The name of the parameter. If this is changed, developers will be re-prompted for a new value.

Optional

  • default (String) A default value for the parameter.
  • description (String) Describe what this parameter does.
  • display_name (String) The displayed name of the parameter as it will appear in the interface.
  • ephemeral (Boolean) The value of an ephemeral parameter will not be preserved between consecutive workspace builds.
  • 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>".
  • mutable (Boolean) Whether this value can be changed after workspace creation. This can be destructive for values like region, so use with caution!
  • option (Block List, Max: 64) Each "option" block defines a value for a user to select from. (see below for nested schema)
  • 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).
  • type (String) The type of this parameter. Must be one of: "number", "string", "bool", or "list(string)".
  • validation (Block List, Max: 1) Validate the input of a parameter. (see below for nested schema)

Read-Only

  • id (String) The ID of this resource.
  • optional (Boolean) Whether this value is optional.
  • value (String) The output value of the parameter.

Nested Schema for option

Required:

  • name (String) The display name of this value in the UI.
  • value (String) The value of this option set on the parameter if selected.

Optional:

Nested Schema for validation

Optional:

  • error (String) An error message to display if the value breaks the validation rules. The following placeholders are supported: {max}, {min}, and {value}.
  • max (Number) The maximum of a number parameter.
  • min (Number) The minimum of a number parameter.
  • monotonic (String) Number monotonicity, either increasing or decreasing.
  • regex (String) A regex for the input parameter to match against.

Read-Only:

  • max_disabled (Boolean) Helper field to check if max is present
  • min_disabled (Boolean) Helper field to check if min is present