Skip to content

Commit b4981a1

Browse files
committed
Add 'since version' to docs for clarity
Signed-off-by: Khosrow Moossavi <khos2ow@gmail.com>
1 parent 2c00107 commit b4981a1

File tree

2 files changed

+33
-6
lines changed

2 files changed

+33
-6
lines changed

docs/user-guide/configuration.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ $ terraform-docs -c .tfdocs-config.yml .
3939

4040
## Options
4141

42+
Since `v0.10.0`
43+
4244
Below is a complete list of options that you can use with `terraform-docs`, with their
4345
corresponding default values (if applicable).
4446

@@ -119,6 +121,8 @@ Valid operators are as follow:
119121

120122
## Formatters
121123

124+
Since `v0.10.0`
125+
122126
The following options are supported out of the box by terraform-docs and can be
123127
used for `FORMATTER_NAME`:
124128

@@ -142,30 +146,39 @@ formatter name must be set to `foo`.
142146

143147
## header-from
144148

149+
Since `v0.10.0`
150+
145151
Relative path to a file to extract header for the generated output from. Supported
146152
file formats are `.adoc`, `.md`, `.tf`, and `.txt`. Default value is `main.tf`.
147153

148154
## footer-from
149155

156+
Since `v0.12.0`
157+
150158
Relative path to a file to extract footer for the generated output from. Supported
151159
file formats are `.adoc`, `.md`, `.tf`, and `.txt`. Default value is `""`.
152160

153161
## Sections
154162

163+
Since `v0.10.0`
164+
155165
The following options are supported and can be used for `sections.show` and
156166
`sections.hide`:
157167

158-
- `data-sources`
168+
- `data-sources` (since `v0.13.0`)
159169
- `header`
170+
- `footer` (since `v0.12.0`)
160171
- `inputs`
161-
- `modules`
172+
- `modules` (since `v0.11.0`)
162173
- `outputs`
163174
- `providers`
164175
- `requirements`
165-
- `resources`
176+
- `resources` (since `v0.11.0`)
166177

167178
## Output
168179

180+
Since `v0.12.0`
181+
169182
Insert generated output to file if `output.file` (or `--output-file string` CLI
170183
flag) is not empty. Insersion behavior can be controlled by `output.mode` (or
171184
`--output-mode string` CLI flag):
@@ -263,6 +276,8 @@ Markdown engine to properly process the comment line after the paragraph.
263276

264277
## Sort
265278

279+
Since `v0.10.0`
280+
266281
To enable sorting of elements `sort.enabled` (or `--sort bool` CLI flag) can be
267282
used. This will indicate sorting is enabled or not, but consecutively type of
268283
sorting can also be specified with `sort.by` (or `--sort-by string` CLI flag).

docs/user-guide/how-to.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ Error: accepts 1 arg(s), received 2
2020

2121
## Visibility of Sections
2222

23+
Since `v0.10.0`
24+
2325
Output generated by `terraform-docs` consists of different [sections] which are
2426
visible by default. The visibility of these can be controlled by one of the following
2527
options:
@@ -68,6 +70,8 @@ $ terraform-docs --hide inputs --hide providers .
6870

6971
## Module Header
7072

73+
Since `v0.10.0`
74+
7175
Module header can be extracted from different sources. Default file to extract
7276
header from is `main.tf`, otherwise you can specify the file with `--header-from FILE`
7377
or corresponding `header-from` in configuration file. Supported file formats to
@@ -106,23 +110,29 @@ formatting to them (i.e. adding `<SPACE><SPACE>` at the end of lines for break,
106110

107111
## Module Footer
108112

113+
Since `v0.12.0`
114+
109115
Extracting module footer works exactly like header with one exception. There is no
110116
default file to attempt extraction from, you need to explicitly specify desired file
111117
to extract content from with `--footer-from FILE` or corresponding `footer-from` in
112118
configuration file.
113119

114120
## Insert Output To File
115121

116-
Since `v0.12.0`, generated output can be insterted directly into the file. There
117-
are two modes of insersion: `inject` (default) or `replace`. Take a look at [output]
118-
configuration for all the details.
122+
Since `v0.12.0`
123+
124+
Generated output can be insterted directly into the file. There are two modes of
125+
insersion: `inject` (default) or `replace`. Take a look at [output] configuration
126+
for all the details.
119127

120128
```console
121129
terraform-docs markdown table --output-file README.md --output-mode inject /path/to/module
122130
```
123131

124132
## Generate terraform.tfvars
125133

134+
Since `v0.9.0`
135+
126136
You can generate `terraform.tfvars` in both `hcl` and `json` format by executing
127137
the following, respectively:
128138

@@ -167,6 +177,8 @@ examples.
167177
168178
## Pre-commit Hook
169179
180+
Since `v0.12.0`
181+
170182
With [`pre-commit`], you can ensure your Terraform module documentation is kept
171183
up-to-date each time you make a commit.
172184

0 commit comments

Comments
 (0)