You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you are using `pre-commit-terraform` already or want to support its development and [many other open-source projects](https://github.com/antonbabenko/terraform-aws-devops), please become a [GitHub Sponsor](https://github.com/sponsors/antonbabenko)!
20
24
25
+
21
26
## Table of content
22
27
23
28
*[Sponsors](#sponsors)
@@ -59,19 +64,30 @@ If you are using `pre-commit-terraform` already or want to support its developme
59
64
60
65
<details><summary><b>Docker</b></summary><br>
61
66
62
-
When `--build-arg` is not specified, the latest version of `pre-commit` and `terraform` will be installed.
To install a specific version of individual tools, define it using `--build-arg` arguments or set it to `latest`:
72
88
73
89
```bash
74
-
docker build -t pre-commit \
90
+
docker build -t pre-commit-terraform \
75
91
--build-arg PRE_COMMIT_VERSION=latest \
76
92
--build-arg TERRAFORM_VERSION=latest \
77
93
--build-arg CHECKOV_VERSION=2.0.405 \
@@ -174,15 +190,18 @@ Execute this command to run `pre-commit` on all files in the repository (not onl
174
190
pre-commit run -a
175
191
```
176
192
177
-
Or, using Docker:
193
+
Or, using Docker ([available tags](https://github.com/antonbabenko/pre-commit-terraform/pkgs/container/pre-commit-terraform/versions)):
178
194
179
195
```bash
180
-
docker run -v $(pwd):/lint -w /lint pre-commit run -a
196
+
TAG=latest
197
+
docker run -v $(pwd):/lint -w /lint ghcr.io/antonbabenko/pre-commit-terraform:$TAG run -a
181
198
```
182
199
183
200
Execute this command to list the versions of the tools in Docker:
201
+
184
202
```bash
185
-
docker run --entrypoint cat pre-commit:latest /usr/bin/tools_versions_info
203
+
TAG=latest
204
+
docker run --entrypoint cat ghcr.io/antonbabenko/pre-commit-terraform:$TAG /usr/bin/tools_versions_info
186
205
```
187
206
188
207
## Available Hooks
@@ -321,7 +340,7 @@ Unlike most other hooks, this hook triggers once if there are any changed files
321
340
2. It is possible to pass additional arguments to shell scripts when using `terraform_docs` and `terraform_docs_without_aggregate_type_defaults`.
322
341
323
342
3. It is possible to automatically:
324
-
* create documentation file
343
+
* create a documentation file
325
344
* extend existing documentation file by appending markers to the end of the file (see item 1 above)
326
345
* use different filename for the documentation (default is `README.md`)
327
346
@@ -333,7 +352,7 @@ Unlike most other hooks, this hook triggers once if there are any changed files
333
352
- --hook-config=--create-file-if-not-exist=true # Boolean. true or false
334
353
```
335
354
336
-
4. You can provide [any configuration available in `terraform-docs`](https://terraform-docs.io/user-guide/configuration/) as argument to `terraform_doc` hook, for example:
355
+
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:
0 commit comments