Files
terraform-docs/docs/user-guide/configuration/footer-from.md
James Geddes bb098187e7 add support for .tofu files
Signed-off-by: James Geddes <j@jamesgeddes.pro>
2025-02-04 17:41:31 +00:00

1.6 KiB

title, description, menu, weight, toc
title description menu weight toc
footer-from footer-from configuration
docs
parent
configuration
122 true

Since v0.12.0

Relative path to a file to extract footer for the generated output from. Supported file formats are .adoc, .md, .tf, .tofu, and .txt.

{{< alert type="info" >}} The whole file content is being extracted as module footer when extracting from .adoc, .md, or .txt. {{< /alert >}}

To extract footer from .tf or .tofu file you need to use following javascript, c, or java like multi-line comment.

/**
 * # Footer
 *
 * Everything in this comment block will get extracted.
 *
 * You can put simple text or complete Markdown content
 * here. Subsequently if you want to render AsciiDoc format
 * you can put AsciiDoc compatible content in this comment
 * block.
 */

resource "foo" "bar" { ... }

{{< alert type="info" >}} This comment must start at the immediate first line of the .tf or .tofu file before any resource, variable, module, etc. {{< /alert >}}

{{< alert type="info" >}} terraform-docs will never alter line-endings of extracted footer text and will assume whatever extracted is intended as is. It's up to you to apply any kind of Markdown formatting to them (i.e. adding <SPACE><SPACE> at the end of lines for break, etc.) {{< /alert >}}

Options

Available options with their default values.

footer-from: ""

Examples

Read footer.md to extract footer:

footer-from: footer.md

Read docs/.footer.md to extract footer:

footer-from: "docs/.footer.md"