Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(terraform_docs): Clarify requrement of --args=--config= #711

Merged
merged 5 commits into from
Sep 2, 2024
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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'd like to use `terraform-docs` config, you must to provide it relative to git repo root path to hook:
MaxymVlasov marked this conversation as resolved.
Show resolved Hide resolved

```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.
MaxymVlasov marked this conversation as resolved.
Show resolved Hide resolved

```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
Loading