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
|`checkov` and `terraform_checkov`|[checkov](https://github.com/bridgecrewio/checkov) static analysis of terraform templates to spot potential security issues. [Hook notes](#checkov-deprecated-and-terraform_checkov)|`checkov`<br>Ubuntu deps: `python3`, `python3-pip`|
223
228
|`infracost_breakdown`| Check how much your infra costs with [infracost](https://github.com/infracost/infracost). [Hook notes](#infracost_breakdown)|`infracost`, `jq`, [Infracost API key](https://www.infracost.io/docs/#2-get-api-key)|
224
229
|`terraform_docs`| Inserts input and output documentation into `README.md`. Recommended. [Hook notes](#terraform_docs)|`terraform-docs`|
225
230
|`terraform_docs_replace`| Runs `terraform-docs` and pipes the output directly to README.md. **DEPRECATED**, see [#248](https://github.com/antonbabenko/pre-commit-terraform/issues/248). [Hook notes](#terraform_docs_replace-deprecated)|`python3`, `terraform-docs`|
@@ -231,6 +236,7 @@ There are several [pre-commit](https://pre-commit.com/) hooks to keep Terraform
231
236
|`terraform_validate`| Validates all Terraform configuration files. [Hook notes](#terraform_validate)| - |
232
237
|`terragrunt_fmt`| Reformat all [Terragrunt](https://github.com/gruntwork-io/terragrunt) configuration files (`*.hcl`) to a canonical format. |`terragrunt`|
233
238
|`terragrunt_validate`| Validates all [Terragrunt](https://github.com/gruntwork-io/terragrunt) configuration files (`*.hcl`) |`terragrunt`|
239
+
|`terraform_wrapper_module_for_each`| Generates Terraform wrappers with `for_each` in module. [Hook notes](#terraform_wrapper_module_for_each)|`hcledit`|
234
240
|`terrascan`|[terrascan](https://github.com/accurics/terrascan) Detect compliance and security violations. [Hook notes](#terrascan)|`terrascan`|
235
241
|`tfupdate`|[tfupdate](https://github.com/minamijoyo/tfupdate) Update version constraints of Terraform core, providers, and modules. [Hook notes](#tfupdate)|`tfupdate`|
236
242
<!-- markdownlint-enable no-inline-html -->
@@ -651,6 +657,27 @@ Example:
651
657
652
658
**Note:** The latter method will leave an "aliased-providers.tf.json" file in your repo. You will either want to automate a way to clean this up or add it to your `.gitignore` or both.
653
659
660
+
### terraform_wrapper_module_for_each
661
+
662
+
`terraform_wrapper_module_for_each`generates module wrappers for Terraform modules (useful for Terragrunt where `for_each` is not supported). When using this hook without arguments it will create wrappers for the root module and all modules available in "modules" directory.
663
+
664
+
You may want to customize some of the options:
665
+
666
+
1. `--module-dir=...` - Specify a single directory to process. Values: "."(means just root module), "modules/iam-user" (a single module), or empty (means include all submodules found in "modules/*").
3. `--module-repo-shortname=...` - Short name of the repository (e.g. "s3-bucket").
669
+
4. `--module-repo-provider=...` - Name of the repository provider (e.g. "aws" or "google").
670
+
671
+
Sample configuration:
672
+
673
+
```yaml
674
+
- id: terraform_wrapper_module_for_each
675
+
args:
676
+
- --args=--module-dir=. # Process only root module
677
+
- --args=--dry-run # No files will be created/updated
678
+
- --args=--verbose # Verbose output
679
+
```
680
+
654
681
### terrascan
655
682
656
683
1. `terrascan` supports custom arguments so you can pass supported flags like `--non-recursive` and `--policy-type` to disable recursive inspection and set the policy type respectively:
@@ -709,9 +736,7 @@ This repository is managed by [Anton Babenko](https://github.com/antonbabenko) w
709
736
710
737
MIT licensed. See [LICENSE](LICENSE) for full details.
711
738
712
-
### Additional terms of use for users from Russia and Belarus
713
-
714
-
By using the code provided in this repository you agree with the following:
739
+
### Additional information for users from Russia and Belarus
715
740
716
741
* Russia has [illegally annexed Crimea in 2014](https://en.wikipedia.org/wiki/Annexation_of_Crimea_by_the_Russian_Federation) and [brought the war in Donbas](https://en.wikipedia.org/wiki/War_in_Donbas) followed by [full-scale invasion of Ukraine in 2022](https://en.wikipedia.org/wiki/2022_Russian_invasion_of_Ukraine).
717
742
* Russia has brought sorrow and devastations to millions of Ukrainians, killed hundreds of innocent people, damaged thousands of buildings, and forced several million people to flee.
0 commit comments