github terraform-docs/terraform-docs v0.15.0

latest releases: v0.17.0, v0.16.0
2 years ago

Notable Updates

The most notable changes in this release are:

  • Generate submodules documents with --recursive flag

    Considering the file structure below of main module and its submodules, now it is possible to generate documentation for them main and all its submodules in one execution.

    Note that generating documentation recursively is allowed only with --output-file set.

    Path to find submodules can be configured with --recursive-path (defaults to modules).

    Each submodule can also have their own .terraform-docs.yml config file, to override configuration from root module.

    .
    ├── README.md
    ├── main.tf
    ├── modules
    │   └── my-sub-module
    │       ├── README.md
    │       ├── main.tf
    │       ├── variables.tf
    │       └── versions.tf
    ├── outputs.tf
    ├── variables.tf
    └── versions.tf
    
  • Ignore extracting versions from terraform.lock.hcl

    New flag, --lockfile, is added to control whether ignore reading .terraform.lock.hcl file in an attempt to extract the exact version of provider being used or not. Default is true.

    If set to true, exact version of provider available in lock file at the time of execution will be extracted. If set to false, the version in .tf file will be used (either exact, or a constrained version: >=, ~>, ...)

  • The updated order of trying to look up for .terraform-docs.yml config file, now, is:

    1. root of module directory
    2. .config/ folder at root of module directory
    3. current directory
    4. .config/ folder at current directory
    5. $HOME/.tfdocs.d/
  • add output-check option for outputs

    This option can be used to compare content of target file with generated output by terraform-doc and fail if different.

  • Remove --show-all, --hide-all, and --sort-by-XXX flags. (which have been deprecated in v0.13.0)

Changelog

Features

d77324c Add new '--show all' and '--hide all' sections
d004771 Add support for generating Packer document
f46a48b Attempt looking up config file in .config folder
1450ee9 Generate submodules documents with '--recursive' flag
5256426 Ignore extracting versions from terraform.lock.hcl
25f03b4 Remove deprecated '--show-all' and '--hide-all' flags
258f460 Remove deprecated '--sort-by-XXX' flags
21eaab4 add output-check option for outputs

Bug Fixes

ab05309 Process \n as line break in --output-template flag
c14edaf Properly format indented code blocks
61cc005 Render resources without URL correctly in Markdown and Asciidoc

Chores

8a288b5 Add Scalr sponsorship
af68ca2 Add new example for MacOs Install docs
77bc780 Bump alpine to 3.14.0
dfd1256 Bump golang to 1.16.6-alpine
bb1e21a Cosmetic cleanup asciidoc module table
490644e Increase test coverage for Config
209ed66 Upgrade go dependencies
567cfcc updating how-to doc for correct Include Examples syntax

Docker images

  • docker pull quay.io/terraform-docs/terraform-docs:latest
  • docker pull quay.io/terraform-docs/terraform-docs:0.15.0

Contributors

Very special thanks to the contributors.

Don't miss a new terraform-docs release

NewReleases is sending notifications on new releases.