mirror of
https://github.com/terraform-docs/terraform-docs.git
synced 2026-03-27 21:08:41 +07:00
726 B
726 B
title, description, menu, weight, toc
| title | description | menu | weight | toc | ||||
|---|---|---|---|---|---|---|---|---|
| Include Examples | How to include example in terraform-docs generated output |
|
205 | false |
Since v0.14.0
Example can be automatically included into README by using content in configuration
file. For example:
$ tree
.
├── examples
│ ├── example-1
│ │ ├── main.tf
│ └── example-2
│ └── main.tf
├── ...
├── main.tf
├── variables.tf
├── ...
└── .terraform-docs.yml
and
# .terraform-docs.yml
content: |-
{{ .Header }}
## Example
```hcl
{{ include "examples/example-1/main.tf" }}
```
{{ .Inputs }}
{{ .Outputs }}