Skip to content

Commit 4356147

Browse files
committed
docs: Added a Markdown printout of the commands.
1 parent d306a1c commit 4356147

File tree

8 files changed

+376
-0
lines changed

8 files changed

+376
-0
lines changed

cmd/root.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,9 @@ func Execute() {
8989
os.Exit(1)
9090
}
9191
}
92+
93+
// Root exposes the root command for tools like doc generators.
94+
// https://cobra.dev/docs/how-to-guides/clis-for-llms/
95+
func Root() *cobra.Command {
96+
return rootCmd
97+
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: "terraform-provider-corefunc"
3+
slug: "terraform-provider-corefunc"
4+
description: "CLI reference for terraform-provider-corefunc"
5+
---
6+
7+
## terraform-provider-corefunc
8+
9+
Utilities that should have been Terraform core functions.
10+
11+
### Synopsis
12+
13+
terraform-provider-corefunc
14+
15+
Utilities that should have been Terraform core functions.
16+
17+
While some of these _can_ be implemented in HCL, some of them begin to push up
18+
against the limits of Terraform and the HCL2 configuration language. We also
19+
perform testing using the Terratest <https://terratest.gruntwork.io> framework
20+
on a regular basis. Exposing these functions as both a Go library as well as a
21+
Terraform provider enables us to use the same functionality in both our
22+
Terraform applies as well as while using a testing framework.
23+
24+
Since Terraform doesn't have the concept of user-defined functions, the next
25+
step to open up the possibilities is to write a custom Terraform Provider which
26+
has the functions built-in, using Terraform's existing support for inputs and
27+
outputs.
28+
29+
**This does not add new syntax or constructs to Terraform.** Instead it uses the
30+
existing concepts around Providers, Resources, Data Sources, Variables, and
31+
Outputs to expose new custom-built functionality.
32+
33+
The goal of this provider is not to call any APIs, but to provide pre-built
34+
functions in the form of Data Sources.
35+
36+
```bash
37+
terraform-provider-corefunc [flags]
38+
```
39+
40+
### Options
41+
42+
```text
43+
-d, --debug Run with support for Go debuggers like delve. https://flwd.dk/3k055Lh
44+
-h, --help help for terraform-provider-corefunc
45+
```
46+
47+
### See also
48+
49+
* [terraform-provider-corefunc json2toml](terraform-provider-corefunc_json2toml.md) - Converts JSON to TOML.
50+
* [terraform-provider-corefunc toml2json](terraform-provider-corefunc_toml2json.md) - Converts TOML to JSON.
51+
* [terraform-provider-corefunc version](terraform-provider-corefunc_version.md) - Long-form version information
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
title: "terraform-provider-corefunc json2toml"
3+
slug: "terraform-provider-corefunc_json2toml"
4+
description: "CLI reference for terraform-provider-corefunc json2toml"
5+
---
6+
7+
## terraform-provider-corefunc json2toml
8+
9+
Converts JSON to TOML.
10+
11+
### Synopsis
12+
13+
Converts JSON to TOML.
14+
15+
```bash
16+
terraform-provider-corefunc json2toml [flags]
17+
```
18+
19+
### Options
20+
21+
```text
22+
-h, --help help for json2toml
23+
```
24+
25+
### See also
26+
27+
* [terraform-provider-corefunc](terraform-provider-corefunc.md) - Utilities that should have been Terraform core functions.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
title: "terraform-provider-corefunc toml2json"
3+
slug: "terraform-provider-corefunc_toml2json"
4+
description: "CLI reference for terraform-provider-corefunc toml2json"
5+
---
6+
7+
## terraform-provider-corefunc toml2json
8+
9+
Converts TOML to JSON.
10+
11+
### Synopsis
12+
13+
Converts TOML to JSON.
14+
15+
```bash
16+
terraform-provider-corefunc toml2json [flags]
17+
```
18+
19+
### Options
20+
21+
```text
22+
-h, --help help for toml2json
23+
```
24+
25+
### See also
26+
27+
* [terraform-provider-corefunc](terraform-provider-corefunc.md) - Utilities that should have been Terraform core functions.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
title: "terraform-provider-corefunc version"
3+
slug: "terraform-provider-corefunc_version"
4+
description: "CLI reference for terraform-provider-corefunc version"
5+
---
6+
7+
## terraform-provider-corefunc version
8+
9+
Long-form version information
10+
11+
### Synopsis
12+
13+
Long-form version information, including the build commit hash, build date, Go
14+
version, and external dependencies.
15+
16+
```bash
17+
terraform-provider-corefunc version [flags]
18+
```
19+
20+
### Options
21+
22+
```text
23+
-h, --help help for version
24+
```
25+
26+
### See also
27+
28+
* [terraform-provider-corefunc](terraform-provider-corefunc.md) - Utilities that should have been Terraform core functions.

go.mod

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ require (
4545
github.com/charmbracelet/x/exp/color v0.0.0-20250821175832-f235fab04313 // indirect
4646
github.com/charmbracelet/x/term v0.2.1 // indirect
4747
github.com/cloudflare/circl v1.6.1 // indirect
48+
github.com/cpuguy83/go-md2man/v2 v2.0.6 // indirect
4849
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
4950
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect
5051
github.com/fatih/color v1.18.0 // indirect
@@ -93,6 +94,7 @@ require (
9394
github.com/pjbgf/sha1cd v0.4.0 // indirect
9495
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
9596
github.com/rivo/uniseg v0.4.7 // indirect
97+
github.com/russross/blackfriday/v2 v2.1.0 // indirect
9698
github.com/sergi/go-diff v1.4.0 // indirect
9799
github.com/spf13/pflag v1.0.7 // indirect
98100
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ github.com/charmbracelet/x/term v0.2.1 h1:AQeHeLZ1OqSXhrAWpYUtZyX1T3zVxfpZuEQMIQ
4848
github.com/charmbracelet/x/term v0.2.1/go.mod h1:oQ4enTYFV7QN4m0i9mzHrViD7TQKvNEEkHUMCmsxdUg=
4949
github.com/cloudflare/circl v1.6.1 h1:zqIqSPIndyBh1bjLVVDHMPpVKqp8Su/V+6MeDzzQBQ0=
5050
github.com/cloudflare/circl v1.6.1/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZh3pJrofs=
51+
github.com/cpuguy83/go-md2man/v2 v2.0.6 h1:XJtiaUW6dEEqVuZiMTn1ldk455QWwEIsMIJlo5vtkx0=
5152
github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
5253
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
5354
github.com/cyphar/filepath-securejoin v0.4.1 h1:JyxxyPEaktOD+GAnqIqTf9A8tHyAG22rowi7HkoSU1s=
@@ -222,6 +223,7 @@ github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUc
222223
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
223224
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
224225
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
226+
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
225227
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
226228
github.com/sergi/go-diff v1.4.0 h1:n/SP9D5ad1fORl+llWyN+D6qoUETXNZARKjyY2/KVCw=
227229
github.com/sergi/go-diff v1.4.0/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4=

0 commit comments

Comments
 (0)