Skip to content

Add checkbox input for boolean variable #2659

@phorcys420

Description

@phorcys420

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy