Commit Graph

15 Commits

Author SHA1 Message Date
Khosrow Moossavi
930bfbaf30 Merge pull request #466 from mikiya771/feature/tfvars-hcl/add-description-flag
Feature/lssue461/add description flag
2021-04-14 12:57:44 -04:00
mikiya771
d914ca71e6 Add a flag for showing description with hcl formatted tfvars
Signed-off-by: mikiya771 <22876341+mikiya771@users.noreply.github.com>

add: cli flag of show description

Signed-off-by: mikiya771 <22876341+mikiya771@users.noreply.github.com>

add: test for tfvars-hcl description flag

Signed-off-by: mikiya771 <22876341+mikiya771@users.noreply.github.com>

docs: add tfvars-hcl flag

Signed-off-by: mikiya771 <22876341+mikiya771@users.noreply.github.com>

fix: inser new lines around value with description

Signed-off-by: mikiya771 <22876341+mikiya771@users.noreply.github.com>

fix: replace with -1 to replaceall for linter

Signed-off-by: mikiya771 <22876341+mikiya771@users.noreply.github.com>

fix: use simple format for linter

Signed-off-by: mikiya771 <22876341+mikiya771@users.noreply.github.com>

fix: padding format as terraform-fmt-way

Signed-off-by: mikiya771 <22876341+mikiya771@users.noreply.github.com>
2021-04-14 21:21:37 +09:00
Khosrow Moossavi
557d53dd1e Deprecate '--sort-by-XX' in favor of '--sort-by XX'
This deprecates sort by flags in favor of their corresponding dynamic
valued ones. Affected flags are:

- `--sort-by-required`
- `--sort-by-type`

In return new `--sort-by string` is added with following values:

- `name` (default)
- `required`
- `type`

Note that the behavior of `--sort bool` was not changed and to disable
sorting altogether you can run `--sort false`.

Signed-off-by: Khosrow Moossavi <khos2ow@gmail.com>
2021-04-12 18:34:42 -04:00
Khosrow Moossavi
eeee58ceda Update reference documentation
Signed-off-by: Khosrow Moossavi <khos2ow@gmail.com>
2021-03-16 09:54:45 -04:00
Khosrow Moossavi
2109520db0 Merge pull request #383 from si-c613/368-Add-Footer-Option
feat: Add support for footer docs (#368)
2021-03-15 14:56:10 -04:00
Simon Clifford
aa1e6bbf59 Add support for footer docs
Enables a footer to be appended to the end of a generated document
sourced from tf files or documents in the same way as the header

Adds the `footer-from` field to the config yml
Adds the `--footer-from` flag to the cli

Signed-off-by: Simon Clifford <siclifford@gmail.com>
Signed-off-by: Khosrow Moossavi <khos2ow@gmail.com>
2021-03-15 14:51:00 -04:00
Edgar R. Sandi
243fb27ca5 add mode resource or data source to generated docs
Signed-off-by: Edgar R. Sandi <edgar.r.sandi@gmail.com>
2021-03-15 12:40:31 -03:00
Khosrow Moossavi
7e489d2bbb Do not modify header lines and trailing whitespaces
This is going to preserve line-ending of extracted header text as they
are provided by users. In other words we are going to always assume the
header text is formatted in the "intended" way by users. So we're never
going to modify line-endings and won't append `<SPACE><SPACE>` at the
end of paragraph lines.

Signed-off-by: Khosrow Moossavi <khos2ow@gmail.com>
2021-03-13 13:43:03 -05:00
Khosrow Moossavi
a3bafd6018 Save generated content directly into a file
There are two modes for saving into file:

- inject: partially replace the target file with generated output
- replace: completely replace the target file with generated output

The output generated by formatters (markdown, asciidoc, etc) will be
inserted into a template before getting saved into the file. This
template can be customized with '--output-template' CLI flag or
corresponding item in '.terraform-docs.yml' config file. Its default
value is:

```
<!-- BEGIN_TF_DOCS -->
{{ .Content }}
<!-- END_TF_DOCS -->
```

This consists of three items, all of them are mandatory:

- begin comment
- content variable
- end comment

You may change the wording of comment as you wish, but the comment must
be present in the template.

Signed-off-by: Khosrow Moossavi <khos2ow@gmail.com>
2021-03-09 16:40:22 -05:00
Edgar R. Sandi
8c05cb9b17 Add resource 'Name' to generated docs
Signed-off-by: Edgar R. Sandi <edgar.r.sandi@gmail.com>
2021-03-09 15:11:39 -03:00
Khosrow Moossavi
780242b506 Add user-guide documentation
Signed-off-by: Khosrow Moossavi <khos2ow@gmail.com>
2021-03-04 18:17:49 -05:00
Khosrow Moossavi
3d39a94e39 Add option to hide Type and Default columns
Two new flags are added: '--default bool' and '--type bool' to
control the visibility of Default and Type columns and section
respectively in Markdown and AsciiDoc.

Signed-off-by: Khosrow Moossavi <khos2ow@gmail.com>
2021-03-02 14:17:03 -05:00
nitrocode
02f490dc65 --anchor to add anchors for markdown, asciidocs
Signed-off-by: nitrocode <nitrocode@users.noreply.github.com>
2021-03-02 12:47:44 -05:00
Khosrow Moossavi
152928007f Update reference documentation and guide
Signed-off-by: Khosrow Moossavi <khos2ow@gmail.com>
2021-03-01 16:42:59 -05:00
Khosrow Moossavi
304bce9bb0 Refactor docs to be published on website
Signed-off-by: Khosrow Moossavi <khos2ow@gmail.com>
2021-02-23 17:28:12 -05:00