fix(cli): allow new immutable parameters via --parameter flag during update by kacpersaw · Pull Request #22221 · coder/coder

@kacpersaw

…update

When a template adds a new immutable parameter, `coder update --parameter`
would reject it with "parameter is immutable and cannot be updated". This
happened because verifyConstraints() didn't distinguish between new immutable
parameters (first-time use, should be allowed) and existing ones (should be
blocked from changing).

The fix adds an isFirstTimeUse check, matching the logic already used by
the interactive prompt path.

Fixes #22164

@kacpersaw

deansheather

@kacpersaw kacpersaw deleted the kacpersaw/fix-immutable-param-update branch

February 24, 2026 08:15