8000 bug: --build-options matches against human name and not Terraform name · Issue #10292 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content
bug: --build-options matches against human name and not Terraform name #10292
Closed
@johnstcn

Description

@johnstcn

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.

Metadata

Metadata

Assignees

Labels

cliArea: CLIparametersbugs & feature requests related to Dynamic Parameterss3Bugs that confuse, annoy, or are purely cosmetic

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0