[CI] Pin Terraform and tfplugindocs versions in check-docs job#3804
Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 4 commits intoMay 28, 2026
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
amarshall-dd
approved these changes
May 19, 2026
aa85ef2 to
733e0dd
Compare
Replaces the @v0.25.0 install pin in tools/tools.go with a `tool github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs` directive in go.mod, so the version is locked by go.sum and the binary is built on demand via `go tool` rather than installed to $GOBIN. Removes the now-redundant tools/ build-tagged file and `tools` make target.
733e0dd to
8f3564e
Compare
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.

Motivation
The
linter-checksjob in.github/workflows/test.ymlrunsmake check-docs, which invokestfplugindocs generate. Two non-hermetic dependencies make this job's outcome depend on the runner image:terraformsetup step:tfplugindocsuses whateverterraformis onPATH(or downloads "latest" via checkpoint). Write-only argument rendering requires Terraform ≥ 1.11. If the runner image (or a contributor's laptop) has an older binary, the regenerated docs silently drop[Write-only]badges and> **NOTE**:callouts.tfplugindocs@latestintools/tools.go: each run pulled the newest release, so an upstream rendering change could flip docs output without any repo change.This combination is what caused PR #3800 — a contributor regenerated docs locally with Terraform 1.5.2 (no write-only support), the regen stripped annotations, and CI then failed in the opposite direction. Pinning both versions makes the docs output deterministic across laptops and CI runners.
Changes
hashicorp/setup-terraform(pinned by SHA,terraform_version: 1.13.1,terraform_wrapper: false) before theCheck Docs Are Up To Datestep in thelinter-checksjob.tfplugindocsvia ago.modtool directive (Go 1.24+): droptools/tools.goand the//go:generate go install ...@latestindirection. The binary is now declared astool github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocsingo.mod, locked ingo.sum, and invoked viago tool tfplugindocs generateinscripts/generate-docs.sh. Bumped fromv0.16.0tov0.25.0.scripts/generate-docs.shso the binary used for docs generation is always visible in logs.check-docsfailure message inGNUmakefilewith a hint pointing at the Terraform version requirement when the diff looks like missing[Write-only]annotations or> **NOTE**:callouts.LICENSE-3rdparty.csvwith the new transitive dependencies pulled in by tfplugindocs v0.25.0 (Kunde21/markdownfmt/v3,bmatcuk/doublestar/v4,hashicorp/cli,yuin/goldmark-meta,go.abhg.dev/goldmark/frontmatter).DEVELOPMENT.mdto reflect the newgo toolinvocation.Testing
Ran locally with Terraform 1.13.1 and the new tfplugindocs pin:
make check-docs output (success path)
license-check passes after CSV update
Failure-path message preview