You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+66-8Lines changed: 66 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,62 @@
1
1
# terraform-plugin-docs
2
2
3
-
This repository contains tools and packages for creating Terraform plugin docs (currently only provider plugins). The primary way users will interact with this is the **tfplugindocs** CLI tool to generate and validate plugin documentation.
3
+
This repository contains tools and packages for creating Terraform plugin docs (currently only provider plugins).
4
+
The primary way users will interact with this is the `tfplugindocs` CLI tool to generate and validate plugin documentation.
4
5
5
-
## tfplugindocs
6
+
## `tfplugindocs`
6
7
7
-
The **tfplugindocs** CLI has two main commands, `validate` and `generate` (`generate` is the default). This tool will let you generate documentation for your provider from live example .tf files and markdown templates. It will also export schema information from the provider (using `terraform providers schema -json`), and sync the schema with the reference documents. If your documentation only consists of simple examples and schema information, the tool can also generate missing template files to make website creation extremely simple for most providers.
8
+
The `tfplugindocs` CLI has two main commands, `validate` and `generate` (`generate` is the default).
9
+
This tool will let you generate documentation for your provider from live example `.tf` files and markdown templates.
10
+
It will also export schema information from the provider (using `terraform providers schema -json`),
11
+
and sync the schema with the reference documents.
12
+
13
+
If your documentation only consists of simple examples and schema information,
14
+
the tool can also generate missing template files to make website creation extremely simple for most providers.
15
+
16
+
### Installation
17
+
18
+
You can install a copy of the binary manually from the [releases](https://github.com/hashicorp/terraform-plugin-docs/releases),
19
+
or you can optionally use the [tools.go model](https://github.com/go-modules-by-example/index/blob/master/010_tools/README.md)
--website-temp-dir <ARG> temporary directory (used during generation)
51
+
```
52
+
53
+
`validate` command:
54
+
55
+
```shell
56
+
$ tfplugindocs validate --help
57
+
58
+
Usage: tfplugindocs validate [<args>]
59
+
```
8
60
9
61
### How it Works
10
62
@@ -19,7 +71,12 @@ When you run `tfplugindocs` from root directory of the provider the tool takes t
19
71
* Copy all non-template files to the output website directory
20
72
* Process all the remaining templates to generate files for the output website directory
21
73
22
-
You can see an example of the templates and output in [paultyng/terraform-provider-unifi](https://github.com/paultyng/terraform-provider-unifi) and browse the generated docs in the [Terraform Registry](https://registry.terraform.io/providers/paultyng/unifi/latest/docs).
74
+
For inspiration, you can look at the templates and output of the
and [here](https://registry.terraform.io/providers/hashicorp/tls/latest/docs).
23
80
24
81
#### About the `id` attribute
25
82
@@ -87,10 +144,11 @@ TBD
87
144
|`plainmarkdown`| Render Markdown content as plaintext |
88
145
|`split`| Split string into sub-strings, eg. `split .Name "_"`|
89
146
90
-
### Installation
91
-
92
-
You can install a copy of the binary manually from the releases, or you can optionally use the [tools.go model](https://github.com/go-modules-by-example/index/blob/master/010_tools/README.md) for tool installation.
93
147
94
148
## Disclaimer
95
149
96
-
This experimental repository contains software which is still being developed and in the alpha testing stage. It is not ready for production use.
150
+
This is still under development: while it's being used for production-ready providers, you might still find bugs
151
+
and limitations. In those cases, please report [issues](https://github.com/hashicorp/terraform-plugin-docs/issues)
152
+
or, if you can, submit a [pull-request](https://github.com/hashicorp/terraform-plugin-docs/pulls).
0 commit comments