Repository navigation
Conversation
Document the convention for modules that pass extra flags to a CLI: name the input additional_args, make it a map(string) of flag to value passed as written, validate keys and reject flags the module already sets (kept in sync with the script by comments), pass it base64 one argument per line, and deprecate rather than remove older names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R2TMgCPW8SL8kUCB28L4dt
On a major bump, require Terraform >= 1.15 and use the native `deprecated` argument with a message naming the replacement; on a minor or patch bump, deprecate by description only, since Terraform 1.14 and older (bundled with Coder v2.36 and earlier) reject the argument. Point the additional_args rule at it and add both to the PR review checklist. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R2TMgCPW8SL8kUCB28L4dt
35C4n0r
reviewed
Oct 22, 2026
| } | ||
| ``` | ||
|
|
||
| ### Deprecating inputs |
Collaborator
There was a problem hiding this comment.
This would need a follow up PR in coder/registry-server to properly handle deprecated variables.
Alternative we can add deprecation: <text> to description.
Member
Author
There was a problem hiding this comment.
Keeping the major-bump rule. The description prefix is already part of it: on a minor or patch bump the Deprecated: use X instead. description is the only signal, and on a major bump the example keeps that prefix alongside deprecated = "...". So registry.coder.com shows the deprecation from the description until coder/registry-server reads the native argument, and that follow-up can land on its own schedule.
Generated by Claude Code
This was referenced Oct 23, 2026
matifali
added a commit
that referenced
this pull request
Oct 23, 2026
Per review on #1202, a map cannot repeat a flag (a repeated key silently keeps only the last value). additional_args is now a list with one element per argument, passed in order, the same type as the extra_args it replaces, so migrating is a rename. -b and --branch are still rejected, with or without =value. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R2TMgCPW8SL8kUCB28L4dt
matifali
added a commit
that referenced
this pull request
Oct 23, 2026
Per review on #1202, a map cannot repeat a flag (a repeated key silently keeps only the last value). additional_args is now a list with one element per argument, passed in order. --port and --add-project are still rejected, with or without =value. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R2TMgCPW8SL8kUCB28L4dt
Per review: a map cannot repeat a flag, and Terraform silently keeps only the last value of a repeated key. The rule now uses list(string), one element per argument, passed in order, with reserved flags checked after stripping any =value. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R2TMgCPW8SL8kUCB28L4dt
This was referenced Oct 23, 2026
…ion rules - The coder-utils encoding table said lists go as base64 JSON; add a row for CLI argument lists, which use newline-joined base64 so scripts need no jq, and say why in the rule. - Add `deprecated` to the variable block order. - Only raise required_version on a major bump when the module has deprecated inputs. - Note that the reserved-flag check is best effort. - Note that output blocks accept `deprecated` too (Terraform 1.15+). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R2TMgCPW8SL8kUCB28L4dt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds two rules to
AGENTS.md(whichCLAUDE.mdlinks to).Extra CLI arguments:
additional_argsadditional_args, alist(string)with one element per argument. Notextra_args,additional_arguments,extra_flags, a map, or a free-form string.["--header", "a", "--header", "b"]). A map can't do that: Terraform silently keeps only the last value of a repeated map key, so an earlier version of this rule that used a map was changed after review.=valuestripped, with a keep-in-sync comment beside both the list and the command in the script.set --, and never word-split orevalit. Useprintf '%q'when writing it into another generated script.additional_argsbeside it, and deprecate the old one under the rule below.code-serverandttydare noted as predating the rule; their stringadditional_argsstays so existing templates don't break.Deprecating inputs
Terraform 1.15 added a
deprecatedargument forvariableblocks. Terraform 1.14 and older reject it withAn argument named "deprecated" is not expected here, even in templates that never set the input. Coder bundles Terraform 1.15.5 from v2.37.0; v2.31.0 through v2.36.0 bundle 1.14.5 (fromTerraformVersioninprovisioner/terraform/install.goat each tag). So the rule is:required_version = ">= 1.15"and give every deprecated input adeprecatedargument, including inputs deprecated earlier by description only. Note the raised minimum as a breaking change.Deprecated: use <new_input> instead.), without raisingrequired_version.deprecatedtakes the warning text, not a boolean.deprecated = trueprints the bare messagetrue, and""prints nothing, so the message must name the replacement. The example keeps theDeprecated:description prefix as well, so registry.coder.com shows the deprecation until coder/registry-server reads the native argument.I checked this against Terraform 1.13.0 through 1.17.0: 1.15 and later warn only when a caller sets the deprecated input, and 1.13 and 1.14 fail to parse. The PR review checklist now covers both points.
Modules following these rules
Already merged and released:
agent-relay-claude-codev0.4.0 (coder/registry#1205)agent-relay-cursorv0.7.0 (coder/registry#1206)Open:
git-clone2.1.0: deprecatesextra_argsby description, since this is a minor bumpmux2.1.0: deprecatesadditional_argumentsby description, since this is a minor bumpType of Change
Testing & Validation
bun test) — documentation onlybun fmt)deprecatedbehavior with Terraform 1.13.0, 1.14.0, 1.15.0, 1.16.0 and 1.17.0, and thelist(string)validation on 1.9.8 and 1.17.0Related Issues
None
🤖 Generated with Claude Code
https://claude.ai/code/session_01R2TMgCPW8SL8kUCB28L4dt