mirror of
https://github.com/terraform-docs/terraform-docs.git
synced 2026-03-27 04:48:33 +07:00
docs: fix typo in README and update configuration guide
* docs: typo in README Adjust typo, and suggest possible readability improvement, in README. * Fix typo in Examples replace 2 instances of providrs with providers Signed-off-by: Bryan Dady <bryan@subsplash.com> * docs: 📝 Update README and user-guide/configuration.md Incorporate suggestions from PR https://github.com/terraform-docs/terraform-docs/pull/564 Signed-off-by: Bryan Dady <bryan@subsplash.com> * docs: 📝 Update guide/configuration.md Incorporate suggestions from PR https://github.com/terraform-docs/terraform-docs/pull/564 Signed-off-by: Bryan Dady <bryan@dady.us> Signed-off-by: Bryan Dady <bryan@subsplash.com>
This commit is contained in:
@@ -164,8 +164,8 @@ when you make a commit.
|
||||
|
||||
## Configuration
|
||||
|
||||
terraform-docs can be configured with a yaml file. Default name of this file is
|
||||
`.terraform-docs.yml` and the order for lookig for it is:
|
||||
terraform-docs can be configured with a yaml file. The default name of this file is
|
||||
`.terraform-docs.yml` and the path order for locating it is:
|
||||
|
||||
1. root of module directory
|
||||
1. `.config/` folder at root of module directory
|
||||
|
||||
@@ -11,12 +11,24 @@ weight: 120
|
||||
toc: true
|
||||
---
|
||||
|
||||
The `terraform-docs` configuration is a yaml file. This is a convenient way to
|
||||
share the configuation amongst teammates, CI, or other toolings. To do so you
|
||||
can use `-c` or `--config` flag which accepts name of the config file.
|
||||
The `terraform-docs` configuration file uses the [yaml format](https://yaml.org/) in order to override any default behaviors.
|
||||
This is a convenient way to share the configuration amongst teammates, CI, or other toolings.
|
||||
|
||||
Default name of this file is `.terraform-docs.yml`, and it will get picked up
|
||||
(if existed) without needing to explicitly passing with config flag.
|
||||
terraform-docs will locate any available configuration file without needing to explicitly pass the `--config` flag.
|
||||
|
||||
The default name of the configuration file is `.terraform-docs.yml`.
|
||||
The path order for locating it is:
|
||||
|
||||
1. root of module directory
|
||||
1. `.config/` folder at root of module directory <sup class="no-top">(since v0.15.0)</sup>
|
||||
1. current directory
|
||||
1. `.config/` folder at current directory <sup class="no-top">(since v0.15.0)</sup>
|
||||
1. `$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.
|
||||
|
||||
Here is an example for how your terraform project file structure might look, and where the `.terraform-docs.yml` file can be placed:
|
||||
|
||||
```bash
|
||||
$ tree
|
||||
@@ -29,6 +41,9 @@ $ tree
|
||||
$ terraform-docs .
|
||||
```
|
||||
|
||||
To use an alternative configuration file name or path you
|
||||
can use the `-c` or `--config` flag.
|
||||
|
||||
Or you can use a config file with any arbitrary name:
|
||||
|
||||
```bash
|
||||
@@ -42,17 +57,6 @@ $ tree
|
||||
$ terraform-docs -c .tfdocs-config.yml .
|
||||
```
|
||||
|
||||
As of `v0.13.0`, the order for looking for config file is:
|
||||
|
||||
1. root of module directory
|
||||
1. `.config/` folder at root of module directory <sup class="no-top">(since v0.15.0)</sup>
|
||||
1. current directory
|
||||
1. `.config/` folder at current directory <sup class="no-top">(since v0.15.0)</sup>
|
||||
1. `$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.
|
||||
|
||||
{{< alert type="primary" >}}
|
||||
Values passed directly as CLI flags will override all of the above.
|
||||
{{< /alert >}}
|
||||
|
||||
@@ -54,7 +54,7 @@ sections:
|
||||
|
||||
## Examples
|
||||
|
||||
Show only `providrs`, `inputs`, and `outputs`.
|
||||
Show only `providers`, `inputs`, and `outputs`.
|
||||
|
||||
```yaml
|
||||
sections:
|
||||
@@ -64,7 +64,7 @@ sections:
|
||||
- outputs
|
||||
```
|
||||
|
||||
Show everything except `providrs`.
|
||||
Show everything except `providers`.
|
||||
|
||||
```yaml
|
||||
sections:
|
||||
|
||||
Reference in New Issue
Block a user