Files
terraform-docs/docs/user-guide
Khosrow Moossavi fcd314b13b Read config from relative path, absolute, or $HOME
Configuration can be loaded with `-c, --config string` which accepts
both relative and absolute paths.

    $ pwd
    /path/to/parent/folder

    $ tree
    .
    ├── module-a
    │   └── main.tf
    ├── module-b
    │   └── main.tf
    ├── ...
    └── .terraform-docs.yml

    # executing from parent
    $ terraform-docs -c .terraform-docs.yml module-a/

    # executing from child
    $ cd module-a/
    $ terraform-docs -c ../.terraform-docs.yml .

    # or an absolute path
    $ terraform-docs -c /path/to/parent/folder/.terraform-docs.yml .

The order for looking for config file is:

1. root of module directory
2. current directory
3. `$HOME/.tfdocs.d/`

if `.terraform-docs.yml` is found in any of the folders above, that will
take precedence and will override the other ones. Note that values passed
directly as CLI flags will override all of the above.

Signed-off-by: Khosrow Moossavi <khos2ow@gmail.com>
2021-04-30 13:59:44 -04:00
..
2021-03-04 18:17:49 -05:00