Skip to content

bug: coder update: impossible to specify new immutable parameter non-interactively #22164

@andrewhamon

Description

@andrewhamon

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Run coder update - it prompts for a value for a new immutable param.

(side note: his is already kind of annoying, i wish it would use the default value. the template provides a safe/correct default for this. cc #21441).

coder update some/workspace
?  [Use arrows to move]
> c2-standard-16 (16 CPU / 64GB / 2nd Gen Xeon Scalable)
  c4d-standard-16 (16 CPU / 64GB / AMD EPYC Turin)

Okay, but I need to script this across several hundred workspaces. If I try to supply the param via CLI, then I get this:

coder update some/workspace --parameter machine_type=c4d-standard-16
Encountered an error running "coder update", see "coder update --help" for more information
error: start workspace: parameter "machine_type" is immutable and cannot be updated

Relevant Log Output

Expected Behavior

I should be able to supply new parameters, even immutable parameters, via the CLI using during coder update.

Even better, i should be able to run coder update and not supply any new parameters at all, it should behave like the UI and automatically use default values if they were provided.

Steps to Reproduce

  1. add a new immutable parameter to a template
  2. attempt to supply a value for it on the cli using coder update

Environment

  • Host OS: macOS
  • Coder version: v2.28.8 (both server and CLI)

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    s1Bugs that break core workflows. Only humans may set this.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions