mirror of
https://github.com/coder/coder.git
synced 2025-07-21 01:28:49 +00:00
feat: influence parameter defaults through cli flag/env (#13039)
* feat: influence parameter defaults through cli flag/env Add a --parameter-default flag / CODER_RICH_PARAMETER_DEFAULT environment variable which overrides default values suggested for parameters. This allows scripts or middleware wrapping the CLI to substitute defaults for parameter values beyond those defined at the template level. For example, Git repository/branch parameters can be given defaults based on the current checkout, or default parameter values can be parsed out of files inside the repo. * Rename defaults arg to defaultOverrides
This commit is contained in:
9
docs/cli/create.md
generated
9
docs/cli/create.md
generated
@ -91,3 +91,12 @@ Rich parameter value in the format "name=value".
|
||||
| Environment | <code>$CODER_RICH_PARAMETER_FILE</code> |
|
||||
|
||||
Specify a file path with values for rich parameters defined in the template.
|
||||
|
||||
### --parameter-default
|
||||
|
||||
| | |
|
||||
| ----------- | ------------------------------------------ |
|
||||
| Type | <code>string-array</code> |
|
||||
| Environment | <code>$CODER_RICH_PARAMETER_DEFAULT</code> |
|
||||
|
||||
Rich parameter default values in the format "name=value".
|
||||
|
9
docs/cli/restart.md
generated
9
docs/cli/restart.md
generated
@ -55,6 +55,15 @@ Rich parameter value in the format "name=value".
|
||||
|
||||
Specify a file path with values for rich parameters defined in the template.
|
||||
|
||||
### --parameter-default
|
||||
|
||||
| | |
|
||||
| ----------- | ------------------------------------------ |
|
||||
| Type | <code>string-array</code> |
|
||||
| Environment | <code>$CODER_RICH_PARAMETER_DEFAULT</code> |
|
||||
|
||||
Rich parameter default values in the format "name=value".
|
||||
|
||||
### --always-prompt
|
||||
|
||||
| | |
|
||||
|
9
docs/cli/start.md
generated
9
docs/cli/start.md
generated
@ -55,6 +55,15 @@ Rich parameter value in the format "name=value".
|
||||
|
||||
Specify a file path with values for rich parameters defined in the template.
|
||||
|
||||
### --parameter-default
|
||||
|
||||
| | |
|
||||
| ----------- | ------------------------------------------ |
|
||||
| Type | <code>string-array</code> |
|
||||
| Environment | <code>$CODER_RICH_PARAMETER_DEFAULT</code> |
|
||||
|
||||
Rich parameter default values in the format "name=value".
|
||||
|
||||
### --always-prompt
|
||||
|
||||
| | |
|
||||
|
9
docs/cli/update.md
generated
9
docs/cli/update.md
generated
@ -53,6 +53,15 @@ Rich parameter value in the format "name=value".
|
||||
|
||||
Specify a file path with values for rich parameters defined in the template.
|
||||
|
||||
### --parameter-default
|
||||
|
||||
| | |
|
||||
| ----------- | ------------------------------------------ |
|
||||
| Type | <code>string-array</code> |
|
||||
| Environment | <code>$CODER_RICH_PARAMETER_DEFAULT</code> |
|
||||
|
||||
Rich parameter default values in the format "name=value".
|
||||
|
||||
### --always-prompt
|
||||
|
||||
| | |
|
||||
|
Reference in New Issue
Block a user