Generated content can be customized further away with `content` in configuration.
If the `content` is empty the default orders of section is used. `content` is a
Go template with following additional variables:
- `{{ .Header }}`
- `{{ .Footer }}`
- `{{ .Inputs }}`
- `{{ .Modules }}`
- `{{ .Outputs }}`
- `{{ .Providers }}`
- `{{ .Requirements }}`
- `{{ .Resources }}`
```yaml
content: |-
Any arbitrary text can be placed anywhere in the content
{{ .Header }}
and even in between sections
{{ .Providers }}
and they don't even need to be in the default order
{{ .Outputs }}
{{ .Inputs }}
```
These variables are the generated output of individual sections in the selected
formatter. For example `{{ .Inputs }}` is Markdown Table representation of inputs
when formatter is set to `markdown table` and AsciiDoc Document representation
when formatter is set to `asciidoc document` and so on.
Compatible formats for customized content are:
- `asciidoc document`
- `asciidoc table`
- `markdown document`
- `markdown table`
Signed-off-by: Khosrow Moossavi <khos2ow@gmail.com>
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>
Originally pkg/print was intended to be public to be used by plugin
developers, but this setting has to be defined by plugin-sdk and as such
it's moved to internal/format to be only used by terraform-docs core
project.
Signed-off-by: Khosrow Moossavi <khos2ow@gmail.com>
Originally pkg/tfconf was set to be public to be used by plugin
developers, but these structs have to be defined by plugin-sdk and as
such it's moved to internal/terraform to be only used by terraform-docs
core project.
Signed-off-by: Khosrow Moossavi <khos2ow@gmail.com>
Generated output will not have any empty line or
carriage return at the end of the last line and
one carriage return (\n) will be added when we
print that to stdout.
Signed-off-by: Khosrow Moossavi <khos2ow@gmail.com>