Skip to content

Rich parameters: mark parameter required #6100

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
mtojek opened this issue Feb 8, 2023 · 5 comments · Fixed by #6586
Closed

Rich parameters: mark parameter required #6100

mtojek opened this issue Feb 8, 2023 · 5 comments · Fixed by #6586
Assignees
Labels
parameters Area: parameters

Comments

@mtojek
Copy link
Member

mtojek commented Feb 8, 2023

The goal of this issue is to enable optional rich parameters. At the moment all parameters are required and there is no easy way to pass an empty value.

Most likely we will need to add an extra property required to terraform-provider-coder.

@mtojek mtojek self-assigned this Feb 12, 2023
@mtojek
Copy link
Member Author

mtojek commented Feb 12, 2023

Let's use the same assumption as for "managed variables"

required? take "default" value if no value provided, otherwise fail

Battle plan:

  • terraform-provider-coder: add required property feat: mark coder_parameter as optional terraform-provider-coder#107
  • Add required column to the database table (default: no)
  • Adjust coderd API validation to obey the constraint
  • Adjust site validation to obey the constraint
    • site: we should present a special form to enter required params without defaults (especially if those are new parameters)
  • CLI: what is the best UX, to load previous values or ask for them?

@bpmct
Copy link
Member

bpmct commented Feb 24, 2023

I noticed that even if I have a default value as "" it won't let me create from the UI

Screenshot 2023-02-23 at 5 40 59 PM

@mtojek
Copy link
Member Author

mtojek commented Feb 24, 2023

I noticed that even if I have a default value as "" it won't let me create from the UI

Yeah, the aim of this issue is to fix this case :)

@mtojek mtojek added the parameters Area: parameters label Feb 28, 2023
@bpmct bpmct added this to the Rich Parameters GA milestone Feb 28, 2023
@mtojek
Copy link
Member Author

mtojek commented Mar 2, 2023

Looking at this one.

@mtojek
Copy link
Member Author

mtojek commented Mar 7, 2023

Co-assigning @BrunoQuaresma to adjust the "Update workspace" flow to let users enter values for newly added parameters.

Current state

Screenshot 2023-03-07 at 12 27 50

CLI 👍

Screenshot 2023-03-07 at 12 28 42

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

Successfully merging a pull request may close this issue.

3 participants