Closed
Description
Related (coderd): #8367
Related (issue): #6828
This PR added support for ephemeral parameters, so now we have add logic to handle them on the UI level.
data "coder_parameter" "force-rebuild" {
name = "force-rebuild"
type = "bool"
display_name = "Force rebuild"
description = "Rebuild the project code"
default = "false"
mutable = true
ephemeral = true
}
Requirements:
Start with options
button or menu item which shows a popup with ephemeral parameters. Menu action should be visible only if there are any ephemeral parametersSettings
>Parameters
- show ephemeral parameters in the new section (Build options?), after Immutable parameters. The site should render the section with default values for ephemeral params. It will be perfect if the site skips submitting ephemeral parameters with default values (coderd can handle this).
I'm not sure about the 2nd requirement, but we need to support somehow this permutation: ephemeral = true
and required = true
.
Sample permutations to check:
ephemeral = true
andrequired = true
(no default) - coderd will require the parameter to be present in every workspace build request, but will not persist its value between consecutive builds (definition of ephemeral)ephemeral = true
anddefault = ""
(empty string) - user can leave this field emptyephemeral = true
anddefault = "abced"
In the meantime, I'm going to work on adjusting the CLI.