terraform-provider-coder icon indicating copy to clipboard operation
terraform-provider-coder copied to clipboard

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

Open sgpublic opened this issue 1 month ago • 0 comments

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.

sgpublic avatar Nov 06 '25 02:11 sgpublic