Skip to content

Commit

Permalink
docs(terraform_docs): Clarify requrement of --args=--config= (#711)
Browse files Browse the repository at this point in the history
---------

Co-authored-by: George L. Yermulnik <[email protected]>
  • Loading branch information
MaxymVlasov and yermulnik authored Sep 2, 2024
1 parent de816af commit 9d3164c
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ Unlike most other hooks, this hook triggers once if there are any changed files
- --hook-config=--use-standard-markers=true # Boolean. Defaults to true (v1.93+), false (<v1.93). Set to true for compatibility with terraform-docs
```

4. You can provide [any configuration available in `terraform-docs`](https://terraform-docs.io/user-guide/configuration/) as an argument to `terraform_doc` hook, for example:
4. If you want to use a terraform-docs config file, you must supply the path to the file, relative to the git repo root path:

```yaml
- id: terraform_docs
Expand All @@ -610,7 +610,15 @@ Unlike most other hooks, this hook triggers once if there are any changed files
> **Warning**
> Avoid use `recursive.enabled: true` in config file, that can cause unexpected behavior.

5. If you need some exotic settings, it can be done too. I.e. this one generates HCL files:
5. You can provide [any configuration available in `terraform-docs`](https://terraform-docs.io/user-guide/configuration/) as an argument to `terraform_docs` hook:

```yaml
- id: terraform_docs
args:
- --args=--output-mode=replace
```

6. If you need some exotic settings, it can be done too. I.e. this one generates HCL files:

```yaml
- id: terraform_docs
Expand Down

0 comments on commit 9d3164c

Please sign in to comment.