Skip to content

Commit 4cb6185

Browse files
committed
feat: replace tools folder with native go tool
add tool dependency and remove tools subfolder run make docs remove dependabot tools config
1 parent 37cf186 commit 4cb6185

File tree

9 files changed

+284
-329
lines changed

9 files changed

+284
-329
lines changed

.github/dependabot.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,6 @@ updates:
99
aws:
1010
patterns:
1111
- "github.com/aws/*"
12-
# go tools
13-
- package-ecosystem: "gomod"
14-
directory: "tools/"
15-
schedule:
16-
interval: "weekly"
1712

1813
# GitHub actions
1914
- package-ecosystem: "github-actions"

go.mod

Lines changed: 62 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,16 @@ require (
1717
go.uber.org/zap v1.27.0
1818
)
1919

20+
tool github.com/terraform-docs/terraform-docs
21+
2022
require (
23+
dario.cat/mergo v1.0.1 // indirect
24+
github.com/BurntSushi/toml v1.4.0 // indirect
25+
github.com/Masterminds/goutils v1.1.1 // indirect
26+
github.com/Masterminds/semver/v3 v3.3.0 // indirect
27+
github.com/Masterminds/sprig/v3 v3.3.0 // indirect
28+
github.com/agext/levenshtein v1.2.3 // indirect
29+
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
2130
github.com/aws/aws-sdk-go-v2/credentials v1.17.67 // indirect
2231
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30 // indirect
2332
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34 // indirect
@@ -29,11 +38,61 @@ require (
2938
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.1 // indirect
3039
github.com/aws/aws-sdk-go-v2/service/sts v1.33.19 // indirect
3140
github.com/aws/smithy-go v1.22.2 // indirect
32-
github.com/davecgh/go-spew v1.1.1 // indirect
41+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
42+
github.com/fatih/color v1.17.0 // indirect
43+
github.com/fsnotify/fsnotify v1.7.0 // indirect
44+
github.com/golang/protobuf v1.5.4 // indirect
45+
github.com/google/go-cmp v0.6.0 // indirect
46+
github.com/hashicorp/go-hclog v1.6.3 // indirect
47+
github.com/hashicorp/go-plugin v1.6.1 // indirect
48+
github.com/hashicorp/go-version v1.7.0 // indirect
49+
github.com/hashicorp/hcl v1.0.0 // indirect
50+
github.com/hashicorp/hcl/v2 v2.22.0 // indirect
51+
github.com/hashicorp/yamux v0.1.1 // indirect
52+
github.com/huandu/xstrings v1.5.0 // indirect
53+
github.com/iancoleman/orderedmap v0.3.0 // indirect
54+
github.com/inconshreveable/mousetrap v1.1.0 // indirect
55+
github.com/magiconair/properties v1.8.7 // indirect
56+
github.com/mattn/go-colorable v0.1.13 // indirect
57+
github.com/mattn/go-isatty v0.0.20 // indirect
58+
github.com/mitchellh/copystructure v1.2.0 // indirect
59+
github.com/mitchellh/go-homedir v1.1.0 // indirect
60+
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
61+
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
62+
github.com/mitchellh/mapstructure v1.5.0 // indirect
63+
github.com/mitchellh/reflectwalk v1.0.2 // indirect
64+
github.com/oklog/run v1.1.0 // indirect
65+
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
3366
github.com/pkg/errors v0.9.1 // indirect
34-
github.com/pmezard/go-difflib v1.0.0 // indirect
67+
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
68+
github.com/sagikazarmark/locafero v0.6.0 // indirect
69+
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
70+
github.com/shopspring/decimal v1.4.0 // indirect
71+
github.com/sourcegraph/conc v0.3.0 // indirect
72+
github.com/spf13/afero v1.11.0 // indirect
73+
github.com/spf13/cast v1.7.0 // indirect
74+
github.com/spf13/cobra v1.8.1 // indirect
75+
github.com/spf13/pflag v1.0.5 // indirect
76+
github.com/spf13/viper v1.19.0 // indirect
77+
github.com/subosito/gotenv v1.6.0 // indirect
78+
github.com/terraform-docs/terraform-config-inspect v0.0.0-20210728164355-9c1f178932fa // indirect
79+
github.com/terraform-docs/terraform-docs v0.20.0 // indirect
3580
github.com/tidwall/match v1.1.1 // indirect
3681
github.com/tidwall/pretty v1.2.1 // indirect
37-
go.uber.org/multierr v1.10.0 // indirect
82+
github.com/zclconf/go-cty v1.15.0 // indirect
83+
go.uber.org/multierr v1.11.0 // indirect
84+
golang.org/x/crypto v0.35.0 // indirect
85+
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect
86+
golang.org/x/mod v0.23.0 // indirect
87+
golang.org/x/net v0.36.0 // indirect
88+
golang.org/x/sync v0.11.0 // indirect
89+
golang.org/x/sys v0.30.0 // indirect
90+
golang.org/x/text v0.22.0 // indirect
91+
golang.org/x/tools v0.30.0 // indirect
92+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect
93+
google.golang.org/grpc v1.66.2 // indirect
94+
google.golang.org/protobuf v1.34.2 // indirect
95+
gopkg.in/ini.v1 v1.67.0 // indirect
3896
gopkg.in/yaml.v3 v3.0.1 // indirect
97+
mvdan.cc/xurls/v2 v2.5.0 // indirect
3998
)

go.sum

Lines changed: 198 additions & 5 deletions
Large diffs are not rendered by default.

testing/Makefile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ LAMBDA_MEMORY_SIZE?=128
1010
CUSTOM_LAMBDA_EXTENSION_ARN?=
1111
LAMBDA_RUNTIME_NORM=$(subst '.','_',$(LAMBDA_RUNTIME))
1212
LAMBDA_APM_AWS_EXTENSION_PATH=$(shell echo $(wildcard ../dist/*-linux-amd64.zip) | cut -d' ' -f1)
13-
TERRAFORM_DOCS=../build/terraform-docs
1413
TERRAFORM_DIRS=$(shell find tf-modules -type d -mindepth 1 -maxdepth 1)
1514

1615
build/$(LAMBDA_RUNTIME_NORM).zip:
@@ -43,14 +42,11 @@ lint:
4342
terraform-init:
4443
@cd benchmarking && terraform init
4544

46-
$(TERRAFORM_DOCS): ../tools/go.mod
47-
@go build -o $@ -modfile=$< github.com/terraform-docs/terraform-docs
48-
4945
.PHONY: docs
50-
docs: $(TERRAFORM_DOCS) $(addsuffix /README.md,$(TERRAFORM_DIRS))
46+
docs: $(addsuffix /README.md,$(TERRAFORM_DIRS))
5147

5248
%/README.md: force
53-
$(TERRAFORM_DOCS) markdown --hide-empty --header-from header.md --output-file=README.md --output-mode replace $(subst README.md,,$@)
49+
go tool github.com/terraform-docs/terraform-docs markdown --hide-empty --header-from header.md --output-file=README.md --output-mode replace $(subst README.md,,$@)
5450

5551
force: ;
5652

testing/tf-modules/tags/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!-- BEGIN_TF_DOCS -->
2+
## Terraform module to tag cloud resources
3+
4+
The module is used to enforce consistent tags on cloud resources
5+
6+
## Inputs
7+
8+
| Name | Description | Type | Default | Required |
9+
|------|-------------|------|---------|:--------:|
10+
| <a name="input_build"></a> [build](#input\_build) | The value to use for the build tag/label | `string` | `"unknown"` | no |
11+
| <a name="input_project"></a> [project](#input\_project) | The value to use for the project tag/label | `string` | n/a | yes |
12+
13+
## Outputs
14+
15+
| Name | Description |
16+
|------|-------------|
17+
| <a name="output_labels"></a> [labels](#output\_labels) | Labels for CSP resources |
18+
| <a name="output_tags"></a> [tags](#output\_tags) | Tags for CSP resources |
19+
<!-- END_TF_DOCS -->

testing/tf-modules/tags/header.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## Terraform module to tag cloud resources
2+
3+
The module is used to enforce consistent tags on cloud resources

tools/go.mod

Lines changed: 0 additions & 66 deletions
This file was deleted.

0 commit comments

Comments
 (0)