Skip to content

coder_parameter of type 'number' should allow empty values in the web UI without requiring a default #462

@sgpublic

Description

@sgpublic

Version: 2.13.1

Problem

When using Coder, if a coder_parameter has the type number and no default value is set, the build fails with the error "" is not a number.

I believe this behavior is not ideal. Ideally, the web interface should allow the parameter to be left empty and require the user to provide a value during the build, rather than requiring a default value to avoid the error.

Example

data "coder_parameter" "ssh_port" {
  name         = "ssh_port"
  display_name = "SSH Port"
  type         = "number"
  mutable      = true
  validation {
    min       = 1024
    max       = 65535
  }
}

Solution

Allow number types to be used without a default value, requiring users to provide a value when creating a workspace.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions