Skip to content

Commit bd3d70e

Browse files
committed
[CI] (Docs) Promote tfplugindocs to a go.mod tool directive
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.
1 parent 53d2088 commit bd3d70e

6 files changed

Lines changed: 58 additions & 62 deletions

File tree

DEVELOPMENT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ Documentation for this provider is autogenerated using the [`tfplugindocs`][8] C
117117

118118
- Ensure each Schema attribute in the code contains a `Description` field
119119
- Place example HCL configuration files or import scripts in the `examples` folder under your resource/data-source
120-
- Run `make docs` to retrieve the `tfplugindocs` binary and generate documentation
120+
- Run `make docs` to generate documentation (the `tfplugindocs` binary is pinned via the `tool` directive in `go.mod` and built on demand via `go tool`)
121121

122122
## Updating the underlying Datadog SDK Clients
123123

GNUmakefile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,7 @@ sweep:
8585
license-check:
8686
@sh -c "'$(CURDIR)/scripts/license-check.sh'"
8787

88-
tools:
89-
go generate -tags tools tools/tools.go
90-
91-
docs: tools
88+
docs:
9289
@sh -c "'$(CURDIR)/scripts/generate-docs.sh'"
9390

9491
check-docs: docs
@@ -106,4 +103,4 @@ check-docs: docs
106103
echo "Success: No generated documentation changes detected"; \
107104
fi
108105

109-
.PHONY: build check-docs docs test testall testacc cassettes vet fmt fmtcheck errcheck lint lint-new lint-fix test-compile tools get-test-deps license-check sweep
106+
.PHONY: build check-docs docs test testall testacc cassettes vet fmt fmtcheck errcheck lint lint-new lint-fix test-compile get-test-deps license-check sweep

go.mod

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ require (
88
github.com/google/uuid v1.6.0
99
github.com/hashicorp/go-cleanhttp v0.5.2
1010
github.com/hashicorp/go-cty v1.5.0
11-
github.com/hashicorp/terraform-plugin-docs v0.16.0
1211
github.com/hashicorp/terraform-plugin-framework v1.19.0
1312
github.com/hashicorp/terraform-plugin-framework-jsontypes v0.2.0
1413
github.com/hashicorp/terraform-plugin-framework-timetypes v0.5.0
@@ -26,38 +25,43 @@ require (
2625
)
2726

2827
require (
28+
github.com/BurntSushi/toml v1.2.1 // indirect
2929
github.com/DataDog/datadog-go v4.8.3+incompatible // indirect
3030
github.com/DataDog/gostackparse v0.5.0 // indirect
3131
github.com/DataDog/sketches-go v1.2.1 // indirect
3232
github.com/DataDog/zstd v1.5.7 // indirect
33+
github.com/Kunde21/markdownfmt/v3 v3.1.0 // indirect
3334
github.com/Masterminds/goutils v1.1.1 // indirect
3435
github.com/Masterminds/sprig/v3 v3.2.3 // indirect
3536
github.com/Microsoft/go-winio v0.6.2 // indirect
36-
github.com/ProtonMail/go-crypto v1.3.0 // indirect
37+
github.com/ProtonMail/go-crypto v1.4.1 // indirect
3738
github.com/agext/levenshtein v1.2.3 // indirect
3839
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
3940
github.com/armon/go-radix v1.0.0 // indirect
4041
github.com/bgentry/speakeasy v0.1.0 // indirect
42+
github.com/bmatcuk/doublestar/v4 v4.10.0 // indirect
4143
github.com/cenkalti/backoff v2.2.1+incompatible // indirect
42-
github.com/cloudflare/circl v1.6.1 // indirect
44+
github.com/cloudflare/circl v1.6.3 // indirect
4345
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
4446
github.com/fatih/color v1.18.0 // indirect
4547
github.com/goccy/go-json v0.10.5 // indirect
4648
github.com/golang/protobuf v1.5.4 // indirect
4749
github.com/google/pprof v0.0.0-20210423192551-a2663126120b // indirect
50+
github.com/hashicorp/cli v1.1.7 // indirect
4851
github.com/hashicorp/errwrap v1.1.0 // indirect
4952
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
5053
github.com/hashicorp/go-hclog v1.6.3 // indirect
5154
github.com/hashicorp/go-multierror v1.1.1 // indirect
5255
github.com/hashicorp/go-plugin v1.7.0 // indirect
5356
github.com/hashicorp/go-retryablehttp v0.7.8 // indirect
5457
github.com/hashicorp/go-uuid v1.0.3 // indirect
55-
github.com/hashicorp/go-version v1.8.0 // indirect
56-
github.com/hashicorp/hc-install v0.9.3 // indirect
58+
github.com/hashicorp/go-version v1.9.0 // indirect
59+
github.com/hashicorp/hc-install v0.9.4 // indirect
5760
github.com/hashicorp/hcl/v2 v2.24.0 // indirect
5861
github.com/hashicorp/logutils v1.0.0 // indirect
5962
github.com/hashicorp/terraform-exec v0.25.0 // indirect
60-
github.com/hashicorp/terraform-json v0.27.2 // indirect
63+
github.com/hashicorp/terraform-json v0.27.3-0.20260213134036-298b8f6b673a // indirect
64+
github.com/hashicorp/terraform-plugin-docs v0.25.0 // indirect
6165
github.com/hashicorp/terraform-plugin-log v0.10.0 // indirect
6266
github.com/hashicorp/terraform-registry-address v0.4.0 // indirect
6367
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
@@ -66,7 +70,7 @@ require (
6670
github.com/imdario/mergo v0.3.15 // indirect
6771
github.com/mattn/go-colorable v0.1.14 // indirect
6872
github.com/mattn/go-isatty v0.0.20 // indirect
69-
github.com/mitchellh/cli v1.1.5 // indirect
73+
github.com/mattn/go-runewidth v0.0.9 // indirect
7074
github.com/mitchellh/copystructure v1.2.0 // indirect
7175
github.com/mitchellh/go-homedir v1.1.0 // indirect
7276
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
@@ -78,14 +82,16 @@ require (
7882
github.com/philhofer/fwd v1.1.1 // indirect
7983
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
8084
github.com/posener/complete v1.2.3 // indirect
81-
github.com/russross/blackfriday v1.6.0 // indirect
8285
github.com/shopspring/decimal v1.3.1 // indirect
8386
github.com/spf13/cast v1.5.0 // indirect
8487
github.com/tinylib/msgp v1.1.6 // indirect
8588
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
8689
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
8790
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
88-
github.com/zclconf/go-cty v1.17.0 // indirect
91+
github.com/yuin/goldmark v1.7.7 // indirect
92+
github.com/yuin/goldmark-meta v1.1.0 // indirect
93+
github.com/zclconf/go-cty v1.18.1 // indirect
94+
go.abhg.dev/goldmark/frontmatter v0.2.0 // indirect
8995
golang.org/x/crypto v0.51.0 // indirect
9096
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df // indirect
9197
golang.org/x/mod v0.36.0 // indirect
@@ -101,8 +107,11 @@ require (
101107
google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217 // indirect
102108
google.golang.org/grpc v1.79.2 // indirect
103109
google.golang.org/protobuf v1.36.11 // indirect
110+
gopkg.in/yaml.v2 v2.3.0 // indirect
104111
)
105112

106-
go 1.25.0
113+
go 1.25.8
107114

108115
toolchain go1.26.1
116+
117+
tool github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs

0 commit comments

Comments
 (0)