Closed
Description
Build options in the CLI specified with --build-options
match against the "Human" name and not the "Terraform" name of the parameter.
For example, let's say you have a template with a parameter:
data "coder_parameter" "verbose" {
type = "bool"
name = "Run Verbosely"
default = false
description = "Show debug output."
}
Let's say you try to start a workspace that uses this template, and set verbose=true
:
coder start myworkspace --build-options --build-option 'verbose=true'
What you'd expect to happen:
# workspace starts with verbose=true
What actually happens:
Encountered an error running "coder start"
parameter "verbose" is not present in the template
ParameterResolver
checks against the rich parameter "name" and not the Terraform "name".
What you need to do instead is:
coder start myworkspace --build-options --build-option 'Run Verbosely=true'
This tripped me up for a good while and I didn't find a big warning in the docs about how this works. So this could be treated either as a CLI bug or a documentation bug.