feat(terraform): use a real example value in Basic Usage - #96
Open
gdrojas wants to merge 1 commit into
Open
Conversation
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.
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.
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 is2.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.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-modulesis 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.