Skip to content

feat(terraform): use a real example value in Basic Usage - #96

Open
gdrojas wants to merge 1 commit into
mainfrom
feat/readme-example-values
Open

feat(terraform): use a real example value in Basic Usage#96
gdrojas wants to merge 1 commit into
mainfrom
feat/readme-example-values

Conversation

@gdrojas

@gdrojas gdrojas commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

A required variable renders as name = "your-variable-name", which is fine for a cluster name and useless for a version: a reader has no way to know that the pinned chart version is 2.44.0.

An # example: <value> comment in the variable block is now read and used in its place, in both Basic Usage and the conditional usage sections.

variable "nullplatform_base_helm_version" {
  # example: 2.44.0
  type = string
}
- nullplatform_base_helm_version = "your-nullplatform-base-helm-version"
+ nullplatform_base_helm_version = "2.44.0"

Backwards compatible

Variables without the comment keep the existing placeholder, so nothing changes for any module that does not opt in. Tested against real HCL: with # example: it takes the value, without it falls back.

Also

Fixes description extraction, which only matched the single-line description = "..." form and left heredoc descriptions blank.

Context

nullplatform/tofu-modules is moving its version variables off defaults so that every version is an explicit decision. When that lands, all of them show up in Basic Usage as placeholders nobody can act on.

A required variable renders as `name = "your-variable-name"`, which is fine for
a cluster name and useless for a version: a reader has no way to know that a
pinned chart version is 2.44.0. Since tofu-modules moved its version variables
off defaults, every one of them now shows up in Basic Usage as a placeholder
nobody can act on.

An `# example: <value>` comment in the variable block is now read and used in
its place, in both Basic Usage and the conditional usage sections. Variables
without the comment keep the existing placeholder, so nothing changes for any
module that does not opt in.

Also fixes description extraction, which only matched the single-line
`description = "..."` form and left heredoc descriptions blank.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant