Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add checkbox input for boolean variable #2659

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Tracked by #3182
phorcys420 opened this issue Jun 26, 2022 · 0 comments · Fixed by #3437
Closed
Tracked by #3182

Add checkbox input for boolean variable #2659

phorcys420 opened this issue Jun 26, 2022 · 0 comments · Fixed by #3437
Assignees

Comments

@phorcys420
Copy link
Member

phorcys420 commented Jun 26, 2022

Problem statement

Terraform has a type = bool, for variables.

Acceptance criteria

On the create workspace screen, Coder renders parameters with type = bool with a checkbox or other true/false input. The CLI has a similar behavior.

Original issue

variable "vnc" {
  description = "Do you want to enable VNC?"
  default = true
  nullable = false
  type = bool

  validation {
    condition     = contains([true, false], var.vnc)
    error_message = "Invalid value!"
  }
}

I'm thinking of this way of representing it, the validation step is kinda useless though.
basically, if a variable's type is equal to bool then it would be nice to have it display as a checkbox rather than a textbox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants