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
@@ -227,7 +232,8 @@ There are several [pre-commit](https://pre-commit.com/) hooks to keep Terraform
227
232
|`terraform_validate`| Validates all Terraform configuration files. [Hook notes](#terraform_validate)| - |
228
233
|`terragrunt_fmt`| Reformat all [Terragrunt](https://github.com/gruntwork-io/terragrunt) configuration files (`*.hcl`) to a canonical format. |`terragrunt`|
229
234
|`terragrunt_validate`| Validates all [Terragrunt](https://github.com/gruntwork-io/terragrunt) configuration files (`*.hcl`) |`terragrunt`|
230
-
|`terrascan`|[terrascan](https://github.com/accurics/terrascan) Detect compliance and security violations. [Hook notes](#terrascan)|`terrascan`|
235
+
|`terrascan`|[terrascan](https://github.com/accurics/terrascan) Detect compliance and security violations. [Hook notes](#terrascan)|`terrascan`|
236
+
|`tfupdate`|[tfupdate](https://github.com/minamijoyo/tfupdate) Update version constraints of Terraform core, providers, and modules. [Hook notes](#tfupdate)|`tfupdate`|
231
237
<!-- markdownlint-enable no-inline-html -->
232
238
233
239
Check the [source file](https://github.com/antonbabenko/pre-commit-terraform/blob/master/.pre-commit-hooks.yaml) to know arguments used for each hook.
@@ -620,6 +626,33 @@ Example:
620
626
3. Use `--skip-rules="ruleID1,ruleID2"` parameter to skip one or more rules globally while scanning (e.g.: `--args=--skip-rules="ruleID1,ruleID2"`).
621
627
4. Use the syntax `#ts:skip=RuleID optional_comment` inside a resource to skip the rule for that resource.
622
628
629
+
### tfupdate
630
+
631
+
1. Out of the box `tfupdate` will pin the terraform version:
632
+
633
+
```yaml
634
+
- id: tfupdate
635
+
name: Autoupdate Terraform versions
636
+
```
637
+
638
+
2. If you'd like to pin providers, etc., use custom arguments, i.e `provider=PROVIDER_NAME`:
639
+
640
+
```yaml
641
+
- id: tfupdate
642
+
name: Autoupdate AWS provider versions
643
+
args:
644
+
- --args=provider aws # Will be pined to latest version
645
+
646
+
- id: tfupdate
647
+
name: Autoupdate Helm provider versions
648
+
args:
649
+
- --args=provider helm
650
+
- --args=--version 2.5.0 # Will be pined to specified version
651
+
```
652
+
653
+
Check [`tfupdate` usage instructions](https://github.com/minamijoyo/tfupdate#usage) for other available options and usage examples.
654
+
No need to pass `--recursive .` as it is added automatically.
655
+
623
656
## Authors
624
657
625
658
This repository is managed by [Anton Babenko](https://github.com/antonbabenko) with help from these awesome contributors:
0 commit comments