From a7e3d90daeac7b74b7231a68078cec614c8aae3d Mon Sep 17 00:00:00 2001 From: Bjorn Olsen Date: Fri, 21 Oct 2022 09:39:42 +0200 Subject: [PATCH 01/43] feat: Add --retry-once-with-cleanup to `terraform_validate` --- README.md | 14 +++++++++-- hooks/terraform_validate.sh | 48 +++++++++++++++++++++++++++++++++---- 2 files changed, 56 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 82c04dad6..da51720ea 100644 --- a/README.md +++ b/README.md @@ -652,7 +652,17 @@ Example: - --tf-init-args=-lockfile=readonly ``` -3. It may happen that Terraform working directory (`.terraform`) already exists but not in the best condition (eg, not initialized modules, wrong version of Terraform, etc.). To solve this problem, you can find and delete all `.terraform` directories in your repository: +3. It may happen that Terraform working directory (`.terraform`) already exists but not in the best condition (eg, not initialized modules, wrong version of Terraform, etc.). To solve this problem, you can delete broken `.terraform` directories in your repository: + + ```yaml + - id: terraform_validate + args: + - --hook-config=--retry-once-with-cleanup=true # Boolean. true or false + ``` + + If `--retry-once-with-cleanup=true`, then in each failed directory the `.terraform` directory will first be deleted before retrying once more. + + An alternative solution is to find and delete all `.terraform` directories in your repository: ```bash echo " @@ -666,7 +676,7 @@ Example: `terraform_validate` hook will try to reinitialize them before running the `terraform validate` command. - **Warning:** If you use Terraform workspaces, DO NOT use this workaround ([details](https://github.com/antonbabenko/pre-commit-terraform/issues/203#issuecomment-918791847)). Wait to [`force-init`](https://github.com/antonbabenko/pre-commit-terraform/issues/224) option implementation. + **Warning:** If you use Terraform workspaces, DO NOT use these workarounds ([details](https://github.com/antonbabenko/pre-commit-terraform/issues/203#issuecomment-918791847)). Wait to [`force-init`](https://github.com/antonbabenko/pre-commit-terraform/issues/224) option implementation. 4. `terraform_validate` in a repo with Terraform module, written using Terraform 0.15+ and which uses provider `configuration_aliases` ([Provider Aliases Within Modules](https://www.terraform.io/language/modules/develop/providers#provider-aliases-within-modules)), errors out. diff --git a/hooks/terraform_validate.sh b/hooks/terraform_validate.sh index cd23a52a8..3ba568ef8 100755 --- a/hooks/terraform_validate.sh +++ b/hooks/terraform_validate.sh @@ -43,17 +43,57 @@ function per_dir_hook_unique_part { local -a -r args=("$@") local exit_code - local validate_output - common::terraform_init 'terraform validate' "$dir_path" || { + # + # Get hook settings + # + local retry_once_with_cleanup=false + + IFS=";" read -r -a configs <<< "${HOOK_CONFIG[*]}" + + for c in "${configs[@]}"; do + + IFS="=" read -r -a config <<< "$c" + key=${config[0]} + value=${config[1]} + + case $key in + --retry-once-with-cleanup) + retry_once_with_cleanup=$value + ;; + esac + done + + function do_validate { + + local exit_code + local validate_output + + common::terraform_init 'terraform validate' "$dir_path" || { + exit_code=$? + return $exit_code + } + + # pass the arguments to hook + validate_output=$(terraform validate "${args[@]}" 2>&1) exit_code=$? + return $exit_code } - # pass the arguments to hook - validate_output=$(terraform validate "${args[@]}" 2>&1) + do_validate exit_code=$? + if [ $exit_code -ne 0 ] && [ "$retry_once_with_cleanup" = true ]; then + if [ -d .terraform ]; then + # Will only be displayed if validation fails again. + common::colorify "yellow" "Validation failed. Re-initialising: $dir_path" + rm -r .terraform + do_validate + exit_code=$? + fi + fi + if [ $exit_code -ne 0 ]; then common::colorify "red" "Validation failed: $dir_path" echo -e "$validate_output\n\n" From c1035428a279ca8ef63e5d028aa323a7816c8466 Mon Sep 17 00:00:00 2001 From: Bjorn Olsen Date: Fri, 28 Oct 2022 11:29:08 +0200 Subject: [PATCH 02/43] Update 1 --- hooks/terraform_validate.sh | 58 ++++++++++++++++++++++++++++--------- 1 file changed, 45 insertions(+), 13 deletions(-) diff --git a/hooks/terraform_validate.sh b/hooks/terraform_validate.sh index 3ba568ef8..4b4090991 100755 --- a/hooks/terraform_validate.sh +++ b/hooks/terraform_validate.sh @@ -43,7 +43,6 @@ function per_dir_hook_unique_part { local -a -r args=("$@") local exit_code - # # Get hook settings # @@ -64,31 +63,64 @@ function per_dir_hook_unique_part { esac done + common::terraform_init 'terraform validate' "$dir_path" || { + exit_code=$? + return $exit_code + } + function do_validate { + validate_output=$(terraform validate "${args[@]}" 2>&1) + exit_code=$? + return $exit_code + } + function parse_validate { + # Requires jq local exit_code local validate_output + local valid + local summary - common::terraform_init 'terraform validate' "$dir_path" || { - exit_code=$? - return $exit_code - } - - # pass the arguments to hook - validate_output=$(terraform validate "${args[@]}" 2>&1) + validate_output=$(terraform validate -json "${args[@]}" 2>&1) exit_code=$? + valid="$(jq -rc '.valid' <<< "$validate_output")" + + if [ "$valid" == "true" ]; then + return 0 + fi + + # Pretty-print error information + echo "$validate_output" | jq '.diagnostics[]' + + # Parse error message + while IFS= read -r error_message; do + summary="$(jq -rc '.summary' <<< "$error_message")" + case $summary in + "missing or corrupted provider plugins") + return 10 + ;; + "Module source has changed") + return 10 + ;; + esac + done < <(jq -rc '.diagnostics[]' <<< "$validate_output") return $exit_code } - do_validate - exit_code=$? + if [ "$retry_once_with_cleanup" = true ]; then + parse_validate + exit_code=$? + else + do_validate + exit_code=$? + fi - if [ $exit_code -ne 0 ] && [ "$retry_once_with_cleanup" = true ]; then + if [ $exit_code -eq 10 ] && [ "$retry_once_with_cleanup" = true ]; then if [ -d .terraform ]; then # Will only be displayed if validation fails again. - common::colorify "yellow" "Validation failed. Re-initialising: $dir_path" - rm -r .terraform + common::colorify "yellow" "Validation failed. Removing .terraform from: $dir_path" + rm -rf .terraform do_validate exit_code=$? fi From 6cf6f32a9f4a8b98c7e44d173c86f705b1c6df11 Mon Sep 17 00:00:00 2001 From: Bjorn Olsen Date: Fri, 4 Nov 2022 07:13:33 +0200 Subject: [PATCH 03/43] Update 2 --- README.md | 72 ++++++++++++++++++++----------------- hooks/terraform_validate.sh | 21 +++++++---- 2 files changed, 55 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index da51720ea..3e3251437 100644 --- a/README.md +++ b/README.md @@ -27,34 +27,35 @@ If you are using `pre-commit-terraform` already or want to support its developme ## Table of content -* [Sponsors](#sponsors) -* [Table of content](#table-of-content) -* [How to install](#how-to-install) - * [1. Install dependencies](#1-install-dependencies) - * [2. Install the pre-commit hook globally](#2-install-the-pre-commit-hook-globally) - * [3. Add configs and hooks](#3-add-configs-and-hooks) - * [4. Run](#4-run) -* [Available Hooks](#available-hooks) -* [Hooks usage notes and examples](#hooks-usage-notes-and-examples) - * [All hooks: Usage of environment variables in `--args`](#all-hooks-usage-of-environment-variables-in---args) - * [All hooks: Set env vars inside hook at runtime](#all-hooks-set-env-vars-inside-hook-at-runtime) - * [All hooks: Disable color output](#all-hooks-disable-color-output) - * [checkov (deprecated) and terraform_checkov](#checkov-deprecated-and-terraform_checkov) - * [infracost_breakdown](#infracost_breakdown) - * [terraform_docs](#terraform_docs) - * [terraform_docs_replace (deprecated)](#terraform_docs_replace-deprecated) - * [terraform_fmt](#terraform_fmt) - * [terraform_providers_lock](#terraform_providers_lock) - * [terraform_tflint](#terraform_tflint) - * [terraform_tfsec](#terraform_tfsec) - * [terraform_validate](#terraform_validate) - * [terraform_wrapper_module_for_each](#terraform_wrapper_module_for_each) - * [terrascan](#terrascan) - * [tfupdate](#tfupdate) -* [Docker Usage: File Permissions](#docker-usage-file-permissions) -* [Authors](#authors) -* [License](#license) - * [Additional information for users from Russia and Belarus](#additional-information-for-users-from-russia-and-belarus) +- [Collection of git hooks for Terraform to be used with pre-commit framework](#collection-of-git-hooks-for-terraform-to-be-used-with-pre-commit-framework) + - [Sponsors](#sponsors) + - [Table of content](#table-of-content) + - [How to install](#how-to-install) + - [1. Install dependencies](#1-install-dependencies) + - [2. Install the pre-commit hook globally](#2-install-the-pre-commit-hook-globally) + - [3. Add configs and hooks](#3-add-configs-and-hooks) + - [4. Run](#4-run) + - [Available Hooks](#available-hooks) + - [Hooks usage notes and examples](#hooks-usage-notes-and-examples) + - [All hooks: Usage of environment variables in `--args`](#all-hooks-usage-of-environment-variables-in---args) + - [All hooks: Set env vars inside hook at runtime](#all-hooks-set-env-vars-inside-hook-at-runtime) + - [All hooks: Disable color output](#all-hooks-disable-color-output) + - [checkov (deprecated) and terraform_checkov](#checkov-deprecated-and-terraform_checkov) + - [infracost_breakdown](#infracost_breakdown) + - [terraform_docs](#terraform_docs) + - [terraform_docs_replace (deprecated)](#terraform_docs_replace-deprecated) + - [terraform_fmt](#terraform_fmt) + - [terraform_providers_lock](#terraform_providers_lock) + - [terraform_tflint](#terraform_tflint) + - [terraform_tfsec](#terraform_tfsec) + - [terraform_validate](#terraform_validate) + - [terraform_wrapper_module_for_each](#terraform_wrapper_module_for_each) + - [terrascan](#terrascan) + - [tfupdate](#tfupdate) + - [Docker Usage: File Permissions](#docker-usage-file-permissions) + - [Authors](#authors) + - [License](#license) + - [Additional information for users from Russia and Belarus](#additional-information-for-users-from-russia-and-belarus) ## How to install @@ -70,7 +71,7 @@ If you are using `pre-commit-terraform` already or want to support its developme * [`TFLint`](https://github.com/terraform-linters/tflint) required for `terraform_tflint` hook. * [`TFSec`](https://github.com/liamg/tfsec) required for `terraform_tfsec` hook. * [`infracost`](https://github.com/infracost/infracost) required for `infracost_breakdown` hook. -* [`jq`](https://github.com/stedolan/jq) required for `infracost_breakdown` hook. +* [`jq`](https://github.com/stedolan/jq) required for `terraform_validate` and `infracost_breakdown` hook. * [`tfupdate`](https://github.com/minamijoyo/tfupdate) required for `tfupdate` hook. * [`hcledit`](https://github.com/minamijoyo/hcledit) required for `terraform_wrapper_module_for_each` hook. @@ -660,8 +661,15 @@ Example: - --hook-config=--retry-once-with-cleanup=true # Boolean. true or false ``` - If `--retry-once-with-cleanup=true`, then in each failed directory the `.terraform` directory will first be deleted before retrying once more. - + If `--retry-once-with-cleanup=true`, then in each failed directory the `.terraform` directory will first be deleted before retrying once more. To avoid unecessary deletion of this directory, the cleanup and retry will only happen if Terraform produces any of the following error messages: + + - Missing or corrupted provider plugins + - Module source has changed + - Module version requirements have changed + - Module not installed + + **Warning:** When using `--retry-once-with-cleanup=true`, problematic `.terraform` directories will be deleted without prompting for consent. + An alternative solution is to find and delete all `.terraform` directories in your repository: ```bash @@ -676,7 +684,7 @@ Example: `terraform_validate` hook will try to reinitialize them before running the `terraform validate` command. - **Warning:** If you use Terraform workspaces, DO NOT use these workarounds ([details](https://github.com/antonbabenko/pre-commit-terraform/issues/203#issuecomment-918791847)). Wait to [`force-init`](https://github.com/antonbabenko/pre-commit-terraform/issues/224) option implementation. + **Warning:** If you use Terraform workspaces, DO NOT use either of these workarounds ([details](https://github.com/antonbabenko/pre-commit-terraform/issues/203#issuecomment-918791847)). Wait to [`force-init`](https://github.com/antonbabenko/pre-commit-terraform/issues/224) option implementation. 4. `terraform_validate` in a repo with Terraform module, written using Terraform 0.15+ and which uses provider `configuration_aliases` ([Provider Aliases Within Modules](https://www.terraform.io/language/modules/develop/providers#provider-aliases-within-modules)), errors out. diff --git a/hooks/terraform_validate.sh b/hooks/terraform_validate.sh index 4b4090991..5a185faed 100755 --- a/hooks/terraform_validate.sh +++ b/hooks/terraform_validate.sh @@ -84,18 +84,18 @@ function per_dir_hook_unique_part { validate_output=$(terraform validate -json "${args[@]}" 2>&1) exit_code=$? - valid="$(jq -rc '.valid' <<< "$validate_output")" + valid=$(jq -rc '.valid' <<< "$validate_output") if [ "$valid" == "true" ]; then return 0 fi # Pretty-print error information - echo "$validate_output" | jq '.diagnostics[]' + jq '.diagnostics[]' <<< "$validate_output" - # Parse error message + # Parse error message, return code 10 to indicate a catch while IFS= read -r error_message; do - summary="$(jq -rc '.summary' <<< "$error_message")" + summary=$(jq -rc '.summary' <<< "$error_message") case $summary in "missing or corrupted provider plugins") return 10 @@ -103,12 +103,20 @@ function per_dir_hook_unique_part { "Module source has changed") return 10 ;; + "Module version requirements have changed") + return 10 + ;; + "Module not installed") + return 10 + ;; esac done < <(jq -rc '.diagnostics[]' <<< "$validate_output") + # Return `terraform validate`'s original exit code + # when `$summary` isn't covered by `case` block above return $exit_code } - if [ "$retry_once_with_cleanup" = true ]; then + if [ "$retry_once_with_cleanup" == "true" ]; then parse_validate exit_code=$? else @@ -116,11 +124,12 @@ function per_dir_hook_unique_part { exit_code=$? fi - if [ $exit_code -eq 10 ] && [ "$retry_once_with_cleanup" = true ]; then + if [ $exit_code -eq 10 ] && [ "$retry_once_with_cleanup" == "true" ]; then if [ -d .terraform ]; then # Will only be displayed if validation fails again. common::colorify "yellow" "Validation failed. Removing .terraform from: $dir_path" rm -rf .terraform + common::colorify "yellow" "Re-validating: $dir_path" do_validate exit_code=$? fi From 1541f3b964f732a455b9255a0d0f9442cb78efd0 Mon Sep 17 00:00:00 2001 From: MaxymVlasov Date: Fri, 4 Nov 2022 20:51:46 +0200 Subject: [PATCH 04/43] Fix README --- README.md | 81 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 41 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index 3e3251437..5d7300728 100644 --- a/README.md +++ b/README.md @@ -27,35 +27,34 @@ If you are using `pre-commit-terraform` already or want to support its developme ## Table of content -- [Collection of git hooks for Terraform to be used with pre-commit framework](#collection-of-git-hooks-for-terraform-to-be-used-with-pre-commit-framework) - - [Sponsors](#sponsors) - - [Table of content](#table-of-content) - - [How to install](#how-to-install) - - [1. Install dependencies](#1-install-dependencies) - - [2. Install the pre-commit hook globally](#2-install-the-pre-commit-hook-globally) - - [3. Add configs and hooks](#3-add-configs-and-hooks) - - [4. Run](#4-run) - - [Available Hooks](#available-hooks) - - [Hooks usage notes and examples](#hooks-usage-notes-and-examples) - - [All hooks: Usage of environment variables in `--args`](#all-hooks-usage-of-environment-variables-in---args) - - [All hooks: Set env vars inside hook at runtime](#all-hooks-set-env-vars-inside-hook-at-runtime) - - [All hooks: Disable color output](#all-hooks-disable-color-output) - - [checkov (deprecated) and terraform_checkov](#checkov-deprecated-and-terraform_checkov) - - [infracost_breakdown](#infracost_breakdown) - - [terraform_docs](#terraform_docs) - - [terraform_docs_replace (deprecated)](#terraform_docs_replace-deprecated) - - [terraform_fmt](#terraform_fmt) - - [terraform_providers_lock](#terraform_providers_lock) - - [terraform_tflint](#terraform_tflint) - - [terraform_tfsec](#terraform_tfsec) - - [terraform_validate](#terraform_validate) - - [terraform_wrapper_module_for_each](#terraform_wrapper_module_for_each) - - [terrascan](#terrascan) - - [tfupdate](#tfupdate) - - [Docker Usage: File Permissions](#docker-usage-file-permissions) - - [Authors](#authors) - - [License](#license) - - [Additional information for users from Russia and Belarus](#additional-information-for-users-from-russia-and-belarus) +* [Sponsors](#sponsors) +* [Table of content](#table-of-content) +* [How to install](#how-to-install) + * [1. Install dependencies](#1-install-dependencies) + * [2. Install the pre-commit hook globally](#2-install-the-pre-commit-hook-globally) + * [3. Add configs and hooks](#3-add-configs-and-hooks) + * [4. Run](#4-run) +* [Available Hooks](#available-hooks) +* [Hooks usage notes and examples](#hooks-usage-notes-and-examples) + * [All hooks: Usage of environment variables in `--args`](#all-hooks-usage-of-environment-variables-in---args) + * [All hooks: Set env vars inside hook at runtime](#all-hooks-set-env-vars-inside-hook-at-runtime) + * [All hooks: Disable color output](#all-hooks-disable-color-output) + * [checkov (deprecated) and terraform_checkov](#checkov-deprecated-and-terraform_checkov) + * [infracost_breakdown](#infracost_breakdown) + * [terraform_docs](#terraform_docs) + * [terraform_docs_replace (deprecated)](#terraform_docs_replace-deprecated) + * [terraform_fmt](#terraform_fmt) + * [terraform_providers_lock](#terraform_providers_lock) + * [terraform_tflint](#terraform_tflint) + * [terraform_tfsec](#terraform_tfsec) + * [terraform_validate](#terraform_validate) + * [terraform_wrapper_module_for_each](#terraform_wrapper_module_for_each) + * [terrascan](#terrascan) + * [tfupdate](#tfupdate) +* [Docker Usage: File Permissions](#docker-usage-file-permissions) +* [Authors](#authors) +* [License](#license) + * [Additional information for users from Russia and Belarus](#additional-information-for-users-from-russia-and-belarus) ## How to install @@ -518,7 +517,7 @@ Example: 1. The hook requires Terraform 0.14 or later. 2. The hook invokes two operations that can be really slow: - * `terraform init` (in case `.terraform` directory is not initialised) + * `terraform init` (in case `.terraform` directory is not initialized) * `terraform providers lock` Both operations require downloading data from remote Terraform registries, and not all of that downloaded data or meta-data is currently being cached by Terraform. @@ -661,12 +660,12 @@ Example: - --hook-config=--retry-once-with-cleanup=true # Boolean. true or false ``` - If `--retry-once-with-cleanup=true`, then in each failed directory the `.terraform` directory will first be deleted before retrying once more. To avoid unecessary deletion of this directory, the cleanup and retry will only happen if Terraform produces any of the following error messages: + If `--retry-once-with-cleanup=true`, then in each failed directory the `.terraform` directory will first be deleted before retrying once more. To avoid unnecessary deletion of this directory, the cleanup and retry will only happen if Terraform produces any of the following error messages: - - Missing or corrupted provider plugins - - Module source has changed - - Module version requirements have changed - - Module not installed + * Missing or corrupted provider plugins + * Module source has changed + * Module version requirements have changed + * Module not installed **Warning:** When using `--retry-once-with-cleanup=true`, problematic `.terraform` directories will be deleted without prompting for consent. @@ -689,17 +688,18 @@ Example: 4. `terraform_validate` in a repo with Terraform module, written using Terraform 0.15+ and which uses provider `configuration_aliases` ([Provider Aliases Within Modules](https://www.terraform.io/language/modules/develop/providers#provider-aliases-within-modules)), errors out. When running the hook against Terraform code where you have provider `configuration_aliases` defined in a `required_providers` configuration block, terraform will throw an error like: - > - > + > Error: Provider configuration not present - > To work with its original provider configuration at provider["registry.terraform.io/hashicorp/aws"]. is required, but it has been removed. This occurs when a provider configuration is removed while - > objects created by that provider still exist in the state. Re-add the provider configuration to destroy , after which you can remove the provider configuration again. + > To work with `` its original provider configuration at provider `["registry.terraform.io/hashicorp/aws"].` is required, but it has been removed. This occurs when a provider configuration is removed while + > objects created by that provider still exist in the state. Re-add the provider configuration to destroy ``, after which you can remove the provider configuration again. This is a [known issue](https://github.com/hashicorp/terraform/issues/28490) with Terraform and how providers are initialized in Terraform 0.15 and later. To work around this you can add an `exclude` parameter to the configuration of `terraform_validate` hook like this: + ```yaml - id: terraform_validate exclude: '^[^/]+$' ``` + This will exclude the root directory from being processed by this hook. Then add a subdirectory like "examples" or "tests" and put an example implementation in place that defines the providers with the proper aliases, and this will give you validation of your module through the example. If instead you are using this with multiple modules in one repository you'll want to set the path prefix in the regular expression, such as `exclude: modules/offendingmodule/[^/]+$`. Alternately, you can use [terraform-config-inspect](https://github.com/hashicorp/terraform-config-inspect) and use a variant of [this script](https://github.com/bendrucker/terraform-configuration-aliases-action/blob/main/providers.sh) to generate a providers file at runtime: @@ -717,6 +717,7 @@ Example: ``` Save it as `.generate-providers.sh` in the root of your repository and add a `pre-commit` hook to run it before all other hooks, like so: + ```yaml - repos: - repo: local @@ -779,7 +780,7 @@ If the generated name is incorrect, set them by providing the `module-repo-short See the `terrascan run -h` command line help for available options. -2. Use the `--args=--verbose` parameter to see the rule ID in the scaning output. Usuful to skip validations. +2. Use the `--args=--verbose` parameter to see the rule ID in the scanning output. Useful to skip validations. 3. Use `--skip-rules="ruleID1,ruleID2"` parameter to skip one or more rules globally while scanning (e.g.: `--args=--skip-rules="ruleID1,ruleID2"`). 4. Use the syntax `#ts:skip=RuleID optional_comment` inside a resource to skip the rule for that resource. From de51a54bea63694af835ff3b8d96d90b41f18221 Mon Sep 17 00:00:00 2001 From: MaxymVlasov Date: Fri, 4 Nov 2022 20:55:34 +0200 Subject: [PATCH 05/43] Clarify when jq needed. Without it - adding jq dep - is BREAKING CHANGE --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5d7300728..450a20c0b 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ If you are using `pre-commit-terraform` already or want to support its developme * [`TFLint`](https://github.com/terraform-linters/tflint) required for `terraform_tflint` hook. * [`TFSec`](https://github.com/liamg/tfsec) required for `terraform_tfsec` hook. * [`infracost`](https://github.com/infracost/infracost) required for `infracost_breakdown` hook. -* [`jq`](https://github.com/stedolan/jq) required for `terraform_validate` and `infracost_breakdown` hook. +* [`jq`](https://github.com/stedolan/jq) required for `terraform_validate` with `--retry-once-with-cleanup` flag, and for `infracost_breakdown` hook. * [`tfupdate`](https://github.com/minamijoyo/tfupdate) required for `tfupdate` hook. * [`hcledit`](https://github.com/minamijoyo/hcledit) required for `terraform_wrapper_module_for_each` hook. @@ -248,7 +248,7 @@ There are several [pre-commit](https://pre-commit.com/) hooks to keep Terraform | Hook name | Description | Dependencies
[Install instructions here](#1-install-dependencies) | -| ------------------------------------------------------ |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------| +| ------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | | `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`
Ubuntu deps: `python3`, `python3-pip` | | `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) | | `terraform_docs` | Inserts input and output documentation into `README.md`. Recommended. [Hook notes](#terraform_docs) | `terraform-docs` | @@ -258,11 +258,11 @@ There are several [pre-commit](https://pre-commit.com/) hooks to keep Terraform | `terraform_providers_lock` | Updates provider signatures in [dependency lock files](https://www.terraform.io/docs/cli/commands/providers/lock.html). [Hook notes](#terraform_providers_lock) | - | | `terraform_tflint` | Validates all Terraform configuration files with [TFLint](https://github.com/terraform-linters/tflint). [Available TFLint rules](https://github.com/terraform-linters/tflint/tree/master/docs/rules#rules). [Hook notes](#terraform_tflint). | `tflint` | | `terraform_tfsec` | [TFSec](https://github.com/aquasecurity/tfsec) static analysis of terraform templates to spot potential security issues. [Hook notes](#terraform_tfsec) | `tfsec` | -| `terraform_validate` | Validates all Terraform configuration files. [Hook notes](#terraform_validate) | - | +| `terraform_validate` | Validates all Terraform configuration files. [Hook notes](#terraform_validate) | `jq`, only for `--retry-once-with-cleanup` flag | | `terragrunt_fmt` | Reformat all [Terragrunt](https://github.com/gruntwork-io/terragrunt) configuration files (`*.hcl`) to a canonical format. | `terragrunt` | | `terragrunt_validate` | Validates all [Terragrunt](https://github.com/gruntwork-io/terragrunt) configuration files (`*.hcl`) | `terragrunt` | | `terraform_wrapper_module_for_each` | Generates Terraform wrappers with `for_each` in module. [Hook notes](#terraform_wrapper_module_for_each) | `hcledit` | -| `terrascan` | [terrascan](https://github.com/tenable/terrascan) Detect compliance and security violations. [Hook notes](#terrascan) | `terrascan` | +| `terrascan` | [terrascan](https://github.com/tenable/terrascan) Detect compliance and security violations. [Hook notes](#terrascan) | `terrascan` | | `tfupdate` | [tfupdate](https://github.com/minamijoyo/tfupdate) Update version constraints of Terraform core, providers, and modules. [Hook notes](#tfupdate) | `tfupdate` | From 0e556edbddc0940762870941d73815982059eaf7 Mon Sep 17 00:00:00 2001 From: MaxymVlasov Date: Fri, 4 Nov 2022 21:13:50 +0200 Subject: [PATCH 06/43] Set constant warning-note style accross README --- README.md | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 450a20c0b..b9b47e7eb 100644 --- a/README.md +++ b/README.md @@ -228,7 +228,7 @@ pre-commit run -a Or, using Docker ([available tags](https://github.com/antonbabenko/pre-commit-terraform/pkgs/container/pre-commit-terraform/versions)): -**NOTE:** This command uses your user id and group id for the docker container to use to access the local files. If the files are owned by another user, update the `USERID` environment variable. See [File Permissions section](#docker-usage-file-permissions) for more information. +> Note: This command uses your user id and group id for the docker container to use to access the local files. If the files are owned by another user, update the `USERID` environment variable. See [File Permissions section](#docker-usage-file-permissions) for more information. ```bash TAG=latest @@ -274,8 +274,9 @@ Check the [source file](https://github.com/antonbabenko/pre-commit-terraform/blo > All, except deprecated hooks: `checkov`, `terraform_docs_replace` -You can use environment variables for the `--args` section. -Note: You _must_ use the `${ENV_VAR}` definition, `$ENV_VAR` will not expand. +You can use environment variables for the `--args` section. + +> **Warning**: You _must_ use the `${ENV_VAR}` definition, `$ENV_VAR` will not expand. Config example: @@ -476,7 +477,7 @@ Unlike most other hooks, this hook triggers once if there are any changed files - --args=--config=.terraform-docs.yml ``` - Note: Avoid use `recursive.enabled: true` in config file, that can cause unexpected behavior. + > **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: @@ -654,12 +655,19 @@ Example: 3. It may happen that Terraform working directory (`.terraform`) already exists but not in the best condition (eg, not initialized modules, wrong version of Terraform, etc.). To solve this problem, you can delete broken `.terraform` directories in your repository: + > **Warning:** If you use Terraform workspaces, DO NOT try to use workarounds in this item ([details](https://github.com/antonbabenko/pre-commit-terraform/issues/203#issuecomment-918791847)). Wait to [`force-init`](https://github.com/antonbabenko/pre-commit-terraform/issues/224) option implementation. + + > **Warning:** When using `--retry-once-with-cleanup=true`, problematic `.terraform` directories will be deleted without prompting for consent. + ```yaml - id: terraform_validate args: - --hook-config=--retry-once-with-cleanup=true # Boolean. true or false ``` + > Note: That flag require additional installed dependency: `jq`. + + If `--retry-once-with-cleanup=true`, then in each failed directory the `.terraform` directory will first be deleted before retrying once more. To avoid unnecessary deletion of this directory, the cleanup and retry will only happen if Terraform produces any of the following error messages: * Missing or corrupted provider plugins @@ -667,7 +675,6 @@ Example: * Module version requirements have changed * Module not installed - **Warning:** When using `--retry-once-with-cleanup=true`, problematic `.terraform` directories will be deleted without prompting for consent. An alternative solution is to find and delete all `.terraform` directories in your repository: @@ -683,8 +690,6 @@ Example: `terraform_validate` hook will try to reinitialize them before running the `terraform validate` command. - **Warning:** If you use Terraform workspaces, DO NOT use either of these workarounds ([details](https://github.com/antonbabenko/pre-commit-terraform/issues/203#issuecomment-918791847)). Wait to [`force-init`](https://github.com/antonbabenko/pre-commit-terraform/issues/224) option implementation. - 4. `terraform_validate` in a repo with Terraform module, written using Terraform 0.15+ and which uses provider `configuration_aliases` ([Provider Aliases Within Modules](https://www.terraform.io/language/modules/develop/providers#provider-aliases-within-modules)), errors out. When running the hook against Terraform code where you have provider `configuration_aliases` defined in a `required_providers` configuration block, terraform will throw an error like: @@ -734,7 +739,7 @@ Example: [...] ``` - **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. + > 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. ### terraform_wrapper_module_for_each From d99140c6a5523e15ffcbcee60f9b5fe09836fec2 Mon Sep 17 00:00:00 2001 From: Bjorn Olsen Date: Fri, 18 Nov 2022 13:01:21 +0200 Subject: [PATCH 07/43] Update 3 --- README.md | 12 ++-- hooks/terraform_validate.sh | 127 +++++++++++++++++++++--------------- 2 files changed, 82 insertions(+), 57 deletions(-) diff --git a/README.md b/README.md index b9b47e7eb..fe7337d52 100644 --- a/README.md +++ b/README.md @@ -655,9 +655,7 @@ Example: 3. It may happen that Terraform working directory (`.terraform`) already exists but not in the best condition (eg, not initialized modules, wrong version of Terraform, etc.). To solve this problem, you can delete broken `.terraform` directories in your repository: - > **Warning:** If you use Terraform workspaces, DO NOT try to use workarounds in this item ([details](https://github.com/antonbabenko/pre-commit-terraform/issues/203#issuecomment-918791847)). Wait to [`force-init`](https://github.com/antonbabenko/pre-commit-terraform/issues/224) option implementation. - - > **Warning:** When using `--retry-once-with-cleanup=true`, problematic `.terraform` directories will be deleted without prompting for consent. + **Option 1** ```yaml - id: terraform_validate @@ -667,14 +665,16 @@ Example: > Note: That flag require additional installed dependency: `jq`. - - If `--retry-once-with-cleanup=true`, then in each failed directory the `.terraform` directory will first be deleted before retrying once more. To avoid unnecessary deletion of this directory, the cleanup and retry will only happen if Terraform produces any of the following error messages: + If `--retry-once-with-cleanup=true`, then in each failed directory the cached modules and providers from the `.terraform` directory will be deleted, before retrying once more. To avoid unnecessary deletion of this directory, the cleanup and retry will only happen if Terraform produces any of the following error messages: * Missing or corrupted provider plugins * Module source has changed * Module version requirements have changed * Module not installed + **Warning:** When using `--retry-once-with-cleanup=true`, problematic `.terraform/modules/` and `.terraform/providers/` directories will be recursively deleted without prompting for consent. Other files and directories will not be affected, such as the `.terraform/environment` file. + + **Option 2** An alternative solution is to find and delete all `.terraform` directories in your repository: @@ -690,6 +690,8 @@ Example: `terraform_validate` hook will try to reinitialize them before running the `terraform validate` command. + **Warning:** If you use Terraform workspaces, DO NOT use this second workaround ([details](https://github.com/antonbabenko/pre-commit-terraform/issues/203#issuecomment-918791847)). Consider the first workaround, or wait to [`force-init`](https://github.com/antonbabenko/pre-commit-terraform/issues/224) option implementation. + 4. `terraform_validate` in a repo with Terraform module, written using Terraform 0.15+ and which uses provider `configuration_aliases` ([Provider Aliases Within Modules](https://www.terraform.io/language/modules/develop/providers#provider-aliases-within-modules)), errors out. When running the hook against Terraform code where you have provider `configuration_aliases` defined in a `required_providers` configuration block, terraform will throw an error like: diff --git a/hooks/terraform_validate.sh b/hooks/terraform_validate.sh index 5a185faed..ef96ce1ce 100755 --- a/hooks/terraform_validate.sh +++ b/hooks/terraform_validate.sh @@ -24,6 +24,74 @@ function main { common::per_dir_hook "$HOOK_ID" "${#ARGS[@]}" "${ARGS[@]}" "${FILES[@]}" } +####################################################################### +# Run `terraform validate` +# Arguments: +# args (array) arguments that configure wrapped tool behavior +# Outputs: +# Returns the exit_code from `terraform validate` +####################################################################### + +function do_validate { + validate_output=$(terraform validate "${args[@]}" 2>&1) + exit_code=$? + return $exit_code +} + +####################################################################### +# Run `terraform validate` and handle errors +# Arguments: +# args (array) arguments that configure wrapped tool behavior +# Outputs: +# Usually returns the exit_code from `terraform validate`. +# If there is an error and the error is recognised then the +# magic number 42 is returned instead. +####################################################################### + +function do_validate_and_handle_errors { + # Requires jq + local exit_code + local validate_output + local valid + local summary + + validate_output=$(terraform validate -json "${args[@]}" 2>&1) + exit_code=$? + + valid=$(jq -rc '.valid' <<< "$validate_output") + + if [ "$valid" == "true" ]; then + return 0 + fi + + # Pretty-print error information + jq '.diagnostics[]' <<< "$validate_output" + + # Parse error message. + # return code 42 (magic number) to indicate a catch so we can respond to it later. + # 42 is used as it is distinct from terraform validate return codes. + while IFS= read -r error_message; do + summary=$(jq -rc '.summary' <<< "$error_message") + case $summary in + "missing or corrupted provider plugins") + return 42 + ;; + "Module source has changed") + return 42 + ;; + "Module version requirements have changed") + return 42 + ;; + "Module not installed") + return 42 + ;; + esac + done < <(jq -rc '.diagnostics[]' <<< "$validate_output") + # Return `terraform validate`'s original exit code + # when `$summary` isn't covered by `case` block above + return $exit_code +} + ####################################################################### # Unique part of `common::per_dir_hook`. The function is executed in loop # on each provided dir path. Run wrapped tool with specified arguments @@ -68,67 +136,22 @@ function per_dir_hook_unique_part { return $exit_code } - function do_validate { - validate_output=$(terraform validate "${args[@]}" 2>&1) - exit_code=$? - return $exit_code - } - - function parse_validate { - # Requires jq - local exit_code - local validate_output - local valid - local summary - - validate_output=$(terraform validate -json "${args[@]}" 2>&1) - exit_code=$? - - valid=$(jq -rc '.valid' <<< "$validate_output") - - if [ "$valid" == "true" ]; then - return 0 - fi - - # Pretty-print error information - jq '.diagnostics[]' <<< "$validate_output" - - # Parse error message, return code 10 to indicate a catch - while IFS= read -r error_message; do - summary=$(jq -rc '.summary' <<< "$error_message") - case $summary in - "missing or corrupted provider plugins") - return 10 - ;; - "Module source has changed") - return 10 - ;; - "Module version requirements have changed") - return 10 - ;; - "Module not installed") - return 10 - ;; - esac - done < <(jq -rc '.diagnostics[]' <<< "$validate_output") - # Return `terraform validate`'s original exit code - # when `$summary` isn't covered by `case` block above - return $exit_code - } - if [ "$retry_once_with_cleanup" == "true" ]; then - parse_validate + do_validate_and_handle_errors exit_code=$? else do_validate exit_code=$? fi - if [ $exit_code -eq 10 ] && [ "$retry_once_with_cleanup" == "true" ]; then + if [ $exit_code -eq 42 ] && [ "$retry_once_with_cleanup" == "true" ]; then if [ -d .terraform ]; then # Will only be displayed if validation fails again. - common::colorify "yellow" "Validation failed. Removing .terraform from: $dir_path" - rm -rf .terraform + common::colorify "yellow" "Validation failed. Removing cached providers and modules from $dir_path/.terraform" + # `.terraform` dir may comprise some extra files, like `environment` + # which stores info about current TF workspace, so we can't just remove + # `.terraform` dir completely. + rm -rf .terraform/{modules,providers}/ common::colorify "yellow" "Re-validating: $dir_path" do_validate exit_code=$? From 2e9485351f969874fbb979fa9cef97a048d65051 Mon Sep 17 00:00:00 2001 From: MaxymVlasov Date: Thu, 24 Nov 2022 16:27:04 +0200 Subject: [PATCH 08/43] Deduplicate code --- README.md | 22 +++++++-------- hooks/terraform_validate.sh | 54 +++++++++++++------------------------ 2 files changed, 29 insertions(+), 47 deletions(-) diff --git a/README.md b/README.md index fe7337d52..d40797a90 100644 --- a/README.md +++ b/README.md @@ -39,16 +39,16 @@ If you are using `pre-commit-terraform` already or want to support its developme * [All hooks: Usage of environment variables in `--args`](#all-hooks-usage-of-environment-variables-in---args) * [All hooks: Set env vars inside hook at runtime](#all-hooks-set-env-vars-inside-hook-at-runtime) * [All hooks: Disable color output](#all-hooks-disable-color-output) - * [checkov (deprecated) and terraform_checkov](#checkov-deprecated-and-terraform_checkov) - * [infracost_breakdown](#infracost_breakdown) - * [terraform_docs](#terraform_docs) - * [terraform_docs_replace (deprecated)](#terraform_docs_replace-deprecated) - * [terraform_fmt](#terraform_fmt) - * [terraform_providers_lock](#terraform_providers_lock) - * [terraform_tflint](#terraform_tflint) - * [terraform_tfsec](#terraform_tfsec) - * [terraform_validate](#terraform_validate) - * [terraform_wrapper_module_for_each](#terraform_wrapper_module_for_each) + * [checkov (deprecated) and terraform\_checkov](#checkov-deprecated-and-terraform_checkov) + * [infracost\_breakdown](#infracost_breakdown) + * [terraform\_docs](#terraform_docs) + * [terraform\_docs\_replace (deprecated)](#terraform_docs_replace-deprecated) + * [terraform\_fmt](#terraform_fmt) + * [terraform\_providers\_lock](#terraform_providers_lock) + * [terraform\_tflint](#terraform_tflint) + * [terraform\_tfsec](#terraform_tfsec) + * [terraform\_validate](#terraform_validate) + * [terraform\_wrapper\_module\_for\_each](#terraform_wrapper_module_for_each) * [terrascan](#terrascan) * [tfupdate](#tfupdate) * [Docker Usage: File Permissions](#docker-usage-file-permissions) @@ -690,7 +690,7 @@ Example: `terraform_validate` hook will try to reinitialize them before running the `terraform validate` command. - **Warning:** If you use Terraform workspaces, DO NOT use this second workaround ([details](https://github.com/antonbabenko/pre-commit-terraform/issues/203#issuecomment-918791847)). Consider the first workaround, or wait to [`force-init`](https://github.com/antonbabenko/pre-commit-terraform/issues/224) option implementation. + **Warning:** If you use Terraform workspaces, DO NOT use this option ([details](https://github.com/antonbabenko/pre-commit-terraform/issues/203#issuecomment-918791847)). Consider the first option, or wait to [`force-init`](https://github.com/antonbabenko/pre-commit-terraform/issues/224) option implementation. 4. `terraform_validate` in a repo with Terraform module, written using Terraform 0.15+ and which uses provider `configuration_aliases` ([Provider Aliases Within Modules](https://www.terraform.io/language/modules/develop/providers#provider-aliases-within-modules)), errors out. diff --git a/hooks/terraform_validate.sh b/hooks/terraform_validate.sh index ef96ce1ce..16fdadd61 100755 --- a/hooks/terraform_validate.sh +++ b/hooks/terraform_validate.sh @@ -25,39 +25,22 @@ function main { } ####################################################################### -# Run `terraform validate` +# Run `terraform validate` and handle errors. Requires `jq`` # Arguments: -# args (array) arguments that configure wrapped tool behavior -# Outputs: -# Returns the exit_code from `terraform validate` -####################################################################### - -function do_validate { - validate_output=$(terraform validate "${args[@]}" 2>&1) - exit_code=$? - return $exit_code -} - -####################################################################### -# Run `terraform validate` and handle errors -# Arguments: -# args (array) arguments that configure wrapped tool behavior +# validate_output (string with json) output of `terraform validate` command +# exit_code (int) `terraform validate` exit code # Outputs: # Usually returns the exit_code from `terraform validate`. -# If there is an error and the error is recognised then the -# magic number 42 is returned instead. +# If there is an error and the error is recognized then will be +# returned exit_code `42`. ####################################################################### +function handle_validate_errors { + local validate_output=$1 + local -i exit_code=$2 -function do_validate_and_handle_errors { - # Requires jq - local exit_code - local validate_output local valid local summary - validate_output=$(terraform validate -json "${args[@]}" 2>&1) - exit_code=$? - valid=$(jq -rc '.valid' <<< "$validate_output") if [ "$valid" == "true" ]; then @@ -69,7 +52,7 @@ function do_validate_and_handle_errors { # Parse error message. # return code 42 (magic number) to indicate a catch so we can respond to it later. - # 42 is used as it is distinct from terraform validate return codes. + # 42 is used as it is distinct from `terraform validate`` return codes. while IFS= read -r error_message; do summary=$(jq -rc '.summary' <<< "$error_message") case $summary in @@ -136,24 +119,23 @@ function per_dir_hook_unique_part { return $exit_code } + validate_output=$(terraform validate "${args[@]}" 2>&1) + exit_code=$? + if [ "$retry_once_with_cleanup" == "true" ]; then - do_validate_and_handle_errors - exit_code=$? - else - do_validate + handle_validate_errors "$validate_output" "$exit_code" exit_code=$? - fi - - if [ $exit_code -eq 42 ] && [ "$retry_once_with_cleanup" == "true" ]; then - if [ -d .terraform ]; then - # Will only be displayed if validation fails again. + # Rinit providers and rerun validation if errors detected + # 42 will be returned from `handle_validate_errors` when errors happen. + if [ $exit_code -eq 42 ] && [ -d .terraform ]; then common::colorify "yellow" "Validation failed. Removing cached providers and modules from $dir_path/.terraform" # `.terraform` dir may comprise some extra files, like `environment` # which stores info about current TF workspace, so we can't just remove # `.terraform` dir completely. rm -rf .terraform/{modules,providers}/ common::colorify "yellow" "Re-validating: $dir_path" - do_validate + + validate_output=$(terraform validate "${args[@]}" 2>&1) exit_code=$? fi fi From 4699596819ef5a371f951aa4de2ea9b3e0cf1651 Mon Sep 17 00:00:00 2001 From: MaxymVlasov Date: Thu, 24 Nov 2022 16:36:08 +0200 Subject: [PATCH 09/43] Improve readability, remove magic numbers --- hooks/terraform_validate.sh | 33 +++++++++++---------------------- 1 file changed, 11 insertions(+), 22 deletions(-) diff --git a/hooks/terraform_validate.sh b/hooks/terraform_validate.sh index 16fdadd61..c2a38e3f2 100755 --- a/hooks/terraform_validate.sh +++ b/hooks/terraform_validate.sh @@ -30,11 +30,9 @@ function main { # validate_output (string with json) output of `terraform validate` command # exit_code (int) `terraform validate` exit code # Outputs: -# Usually returns the exit_code from `terraform validate`. -# If there is an error and the error is recognized then will be -# returned exit_code `42`. +# Returns "boolean" - 1 (true, have errors), 0 (false, no errors) ####################################################################### -function handle_validate_errors { +function find_validate_errors { local validate_output=$1 local -i exit_code=$2 @@ -56,23 +54,15 @@ function handle_validate_errors { while IFS= read -r error_message; do summary=$(jq -rc '.summary' <<< "$error_message") case $summary in - "missing or corrupted provider plugins") - return 42 - ;; - "Module source has changed") - return 42 - ;; - "Module version requirements have changed") - return 42 - ;; - "Module not installed") - return 42 - ;; + "missing or corrupted provider plugins") return 1 ;; + "Module source has changed") return 1 ;; + "Module version requirements have changed") return 1 ;; + "Module not installed") return 1 ;; esac done < <(jq -rc '.diagnostics[]' <<< "$validate_output") # Return `terraform validate`'s original exit code # when `$summary` isn't covered by `case` block above - return $exit_code + return 0 } ####################################################################### @@ -123,11 +113,10 @@ function per_dir_hook_unique_part { exit_code=$? if [ "$retry_once_with_cleanup" == "true" ]; then - handle_validate_errors "$validate_output" "$exit_code" - exit_code=$? - # Rinit providers and rerun validation if errors detected - # 42 will be returned from `handle_validate_errors` when errors happen. - if [ $exit_code -eq 42 ] && [ -d .terraform ]; then + local validate_have_errors + validate_have_errors=$(find_validate_errors "$validate_output") + + if [ "$validate_have_errors" -eq 1 ] && [ -d .terraform ]; then common::colorify "yellow" "Validation failed. Removing cached providers and modules from $dir_path/.terraform" # `.terraform` dir may comprise some extra files, like `environment` # which stores info about current TF workspace, so we can't just remove From a756cc634ef46439428caf3327a02494bb5667f8 Mon Sep 17 00:00:00 2001 From: Maksym Vlasov Date: Thu, 24 Nov 2022 16:37:46 +0200 Subject: [PATCH 10/43] Apply suggestions from code review --- hooks/terraform_validate.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/hooks/terraform_validate.sh b/hooks/terraform_validate.sh index c2a38e3f2..a5a3f9f2c 100755 --- a/hooks/terraform_validate.sh +++ b/hooks/terraform_validate.sh @@ -109,6 +109,7 @@ function per_dir_hook_unique_part { return $exit_code } + # pass the arguments to hook validate_output=$(terraform validate "${args[@]}" 2>&1) exit_code=$? From a65aaab5c2967c5ce58e7c80253648fa18def47f Mon Sep 17 00:00:00 2001 From: MaxymVlasov Date: Thu, 24 Nov 2022 16:57:11 +0200 Subject: [PATCH 11/43] Fixup --- hooks/terraform_validate.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hooks/terraform_validate.sh b/hooks/terraform_validate.sh index a5a3f9f2c..2392efd21 100755 --- a/hooks/terraform_validate.sh +++ b/hooks/terraform_validate.sh @@ -114,10 +114,10 @@ function per_dir_hook_unique_part { exit_code=$? if [ "$retry_once_with_cleanup" == "true" ]; then - local validate_have_errors + local validate_have_errors -i validate_have_errors=$(find_validate_errors "$validate_output") - - if [ "$validate_have_errors" -eq 1 ] && [ -d .terraform ]; then + # shellcheck disable=SC2086 # False positive + if [ $validate_have_errors -eq 1 ] && [ -d .terraform ]; then common::colorify "yellow" "Validation failed. Removing cached providers and modules from $dir_path/.terraform" # `.terraform` dir may comprise some extra files, like `environment` # which stores info about current TF workspace, so we can't just remove From 3d758f5a0439d92a315b082dacecc13f8b4a57d6 Mon Sep 17 00:00:00 2001 From: MaxymVlasov Date: Thu, 24 Nov 2022 17:00:18 +0200 Subject: [PATCH 12/43] fixup --- hooks/terraform_validate.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hooks/terraform_validate.sh b/hooks/terraform_validate.sh index 2392efd21..61ac404f5 100755 --- a/hooks/terraform_validate.sh +++ b/hooks/terraform_validate.sh @@ -114,10 +114,10 @@ function per_dir_hook_unique_part { exit_code=$? if [ "$retry_once_with_cleanup" == "true" ]; then - local validate_have_errors -i + local validate_have_errors validate_have_errors=$(find_validate_errors "$validate_output") - # shellcheck disable=SC2086 # False positive - if [ $validate_have_errors -eq 1 ] && [ -d .terraform ]; then + + if [ "$validate_have_errors" == 1 ] && [ -d .terraform ]; then common::colorify "yellow" "Validation failed. Removing cached providers and modules from $dir_path/.terraform" # `.terraform` dir may comprise some extra files, like `environment` # which stores info about current TF workspace, so we can't just remove From e83def1aa427555cfb362cbc0cdfd4b408635452 Mon Sep 17 00:00:00 2001 From: MaxymVlasov Date: Thu, 24 Nov 2022 17:21:57 +0200 Subject: [PATCH 13/43] fixup --- hooks/terraform_validate.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hooks/terraform_validate.sh b/hooks/terraform_validate.sh index 61ac404f5..7c38002e4 100755 --- a/hooks/terraform_validate.sh +++ b/hooks/terraform_validate.sh @@ -58,6 +58,7 @@ function find_validate_errors { "Module source has changed") return 1 ;; "Module version requirements have changed") return 1 ;; "Module not installed") return 1 ;; + "Could not load plugin") return 1 ;; esac done < <(jq -rc '.diagnostics[]' <<< "$validate_output") # Return `terraform validate`'s original exit code @@ -117,7 +118,7 @@ function per_dir_hook_unique_part { local validate_have_errors validate_have_errors=$(find_validate_errors "$validate_output") - if [ "$validate_have_errors" == 1 ] && [ -d .terraform ]; then + if [[ $validate_have_errors ]] && [ -d .terraform ]; then common::colorify "yellow" "Validation failed. Removing cached providers and modules from $dir_path/.terraform" # `.terraform` dir may comprise some extra files, like `environment` # which stores info about current TF workspace, so we can't just remove From 8a60156a74ae851dca57bbf1adc8d4dfa8e8c2d7 Mon Sep 17 00:00:00 2001 From: MaxymVlasov Date: Thu, 24 Nov 2022 17:30:13 +0200 Subject: [PATCH 14/43] fixup --- hooks/terraform_validate.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hooks/terraform_validate.sh b/hooks/terraform_validate.sh index 7c38002e4..ebe49882b 100755 --- a/hooks/terraform_validate.sh +++ b/hooks/terraform_validate.sh @@ -49,8 +49,6 @@ function find_validate_errors { jq '.diagnostics[]' <<< "$validate_output" # Parse error message. - # return code 42 (magic number) to indicate a catch so we can respond to it later. - # 42 is used as it is distinct from `terraform validate`` return codes. while IFS= read -r error_message; do summary=$(jq -rc '.summary' <<< "$error_message") case $summary in @@ -111,14 +109,14 @@ function per_dir_hook_unique_part { } # pass the arguments to hook - validate_output=$(terraform validate "${args[@]}" 2>&1) + validate_output=$(terraform validate -json "${args[@]}" 2>&1) exit_code=$? if [ "$retry_once_with_cleanup" == "true" ]; then local validate_have_errors validate_have_errors=$(find_validate_errors "$validate_output") - if [[ $validate_have_errors ]] && [ -d .terraform ]; then + if [ "$validate_have_errors" -eq 1 ] && [ -d .terraform ]; then common::colorify "yellow" "Validation failed. Removing cached providers and modules from $dir_path/.terraform" # `.terraform` dir may comprise some extra files, like `environment` # which stores info about current TF workspace, so we can't just remove From b3e420b84a7bd76a3269540bef990cdc60ba9a1c Mon Sep 17 00:00:00 2001 From: MaxymVlasov Date: Thu, 24 Nov 2022 17:34:11 +0200 Subject: [PATCH 15/43] Add tf init --- hooks/terraform_validate.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hooks/terraform_validate.sh b/hooks/terraform_validate.sh index ebe49882b..060468ccf 100755 --- a/hooks/terraform_validate.sh +++ b/hooks/terraform_validate.sh @@ -124,6 +124,11 @@ function per_dir_hook_unique_part { rm -rf .terraform/{modules,providers}/ common::colorify "yellow" "Re-validating: $dir_path" + common::terraform_init 'terraform validate' "$dir_path" || { + exit_code=$? + return $exit_code + } + validate_output=$(terraform validate "${args[@]}" 2>&1) exit_code=$? fi From c0d169d95476a5b2fd06bdf9dbdf19c67e1ce20f Mon Sep 17 00:00:00 2001 From: MaxymVlasov Date: Thu, 24 Nov 2022 17:42:05 +0200 Subject: [PATCH 16/43] fixup --- hooks/terraform_validate.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hooks/terraform_validate.sh b/hooks/terraform_validate.sh index 060468ccf..89d378b4f 100755 --- a/hooks/terraform_validate.sh +++ b/hooks/terraform_validate.sh @@ -108,9 +108,11 @@ function per_dir_hook_unique_part { return $exit_code } - # pass the arguments to hook - validate_output=$(terraform validate -json "${args[@]}" 2>&1) - exit_code=$? + if [ "$retry_once_with_cleanup" == "true" ]; then + validate_output=$(terraform validate -json "${args[@]}" 2>&1) + else + validate_output=$(terraform validate "${args[@]}" 2>&1) + fi if [ "$retry_once_with_cleanup" == "true" ]; then local validate_have_errors From d4764475f873d43b0222f6bd51953d021d34d350 Mon Sep 17 00:00:00 2001 From: MaxymVlasov Date: Thu, 24 Nov 2022 17:57:02 +0200 Subject: [PATCH 17/43] Simplify codebase --- hooks/terraform_validate.sh | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/hooks/terraform_validate.sh b/hooks/terraform_validate.sh index 89d378b4f..9907f8ac1 100755 --- a/hooks/terraform_validate.sh +++ b/hooks/terraform_validate.sh @@ -110,32 +110,25 @@ function per_dir_hook_unique_part { if [ "$retry_once_with_cleanup" == "true" ]; then validate_output=$(terraform validate -json "${args[@]}" 2>&1) - else - validate_output=$(terraform validate "${args[@]}" 2>&1) - fi - if [ "$retry_once_with_cleanup" == "true" ]; then local validate_have_errors validate_have_errors=$(find_validate_errors "$validate_output") - if [ "$validate_have_errors" -eq 1 ] && [ -d .terraform ]; then - common::colorify "yellow" "Validation failed. Removing cached providers and modules from $dir_path/.terraform" - # `.terraform` dir may comprise some extra files, like `environment` - # which stores info about current TF workspace, so we can't just remove - # `.terraform` dir completely. - rm -rf .terraform/{modules,providers}/ - common::colorify "yellow" "Re-validating: $dir_path" - - common::terraform_init 'terraform validate' "$dir_path" || { - exit_code=$? - return $exit_code - } - - validate_output=$(terraform validate "${args[@]}" 2>&1) - exit_code=$? + if [ "$validate_have_errors" -eq 0 ]; then + return 0 fi + + common::colorify "yellow" "Validation failed. Removing cached providers and modules from $dir_path/.terraform" + # `.terraform` dir may comprise some extra files, like `environment` + # which stores info about current TF workspace, so we can't just remove + # `.terraform` dir completely. + rm -rf .terraform/{modules,providers}/ + common::colorify "yellow" "Re-validating: $dir_path" fi + validate_output=$(terraform validate "${args[@]}" 2>&1) + exit_code=$? + if [ $exit_code -ne 0 ]; then common::colorify "red" "Validation failed: $dir_path" echo -e "$validate_output\n\n" From 7574616c2a72869d55fb90ee9caf0bc485e0a835 Mon Sep 17 00:00:00 2001 From: MaxymVlasov Date: Thu, 24 Nov 2022 18:00:26 +0200 Subject: [PATCH 18/43] f --- hooks/terraform_validate.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hooks/terraform_validate.sh b/hooks/terraform_validate.sh index 9907f8ac1..a8b90412b 100755 --- a/hooks/terraform_validate.sh +++ b/hooks/terraform_validate.sh @@ -111,10 +111,10 @@ function per_dir_hook_unique_part { if [ "$retry_once_with_cleanup" == "true" ]; then validate_output=$(terraform validate -json "${args[@]}" 2>&1) - local validate_have_errors + local -i validate_have_errors validate_have_errors=$(find_validate_errors "$validate_output") - if [ "$validate_have_errors" -eq 0 ]; then + if [ "$validate_have_errors" == "0" ]; then return 0 fi From c2d5c425c5919a46a61b553b16142c7d5eed7a2d Mon Sep 17 00:00:00 2001 From: MaxymVlasov Date: Thu, 24 Nov 2022 18:02:19 +0200 Subject: [PATCH 19/43] f --- hooks/terraform_validate.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hooks/terraform_validate.sh b/hooks/terraform_validate.sh index a8b90412b..cd2345a65 100755 --- a/hooks/terraform_validate.sh +++ b/hooks/terraform_validate.sh @@ -28,13 +28,11 @@ function main { # Run `terraform validate` and handle errors. Requires `jq`` # Arguments: # validate_output (string with json) output of `terraform validate` command -# exit_code (int) `terraform validate` exit code # Outputs: # Returns "boolean" - 1 (true, have errors), 0 (false, no errors) ####################################################################### function find_validate_errors { local validate_output=$1 - local -i exit_code=$2 local valid local summary @@ -59,8 +57,7 @@ function find_validate_errors { "Could not load plugin") return 1 ;; esac done < <(jq -rc '.diagnostics[]' <<< "$validate_output") - # Return `terraform validate`'s original exit code - # when `$summary` isn't covered by `case` block above + return 0 } From 7a7a621673440f890eb212d5cdd2062a38f588c9 Mon Sep 17 00:00:00 2001 From: MaxymVlasov Date: Thu, 24 Nov 2022 18:04:39 +0200 Subject: [PATCH 20/43] debug --- hooks/terraform_validate.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/hooks/terraform_validate.sh b/hooks/terraform_validate.sh index cd2345a65..5e960b8a7 100755 --- a/hooks/terraform_validate.sh +++ b/hooks/terraform_validate.sh @@ -99,18 +99,18 @@ function per_dir_hook_unique_part { ;; esac done - +echo "init 1" common::terraform_init 'terraform validate' "$dir_path" || { exit_code=$? return $exit_code } - +echo "before if" if [ "$retry_once_with_cleanup" == "true" ]; then validate_output=$(terraform validate -json "${args[@]}" 2>&1) - +echo "validate_have_errors" local -i validate_have_errors validate_have_errors=$(find_validate_errors "$validate_output") - +echo "validate_have_errors == 0" if [ "$validate_have_errors" == "0" ]; then return 0 fi @@ -121,11 +121,12 @@ function per_dir_hook_unique_part { # `.terraform` dir completely. rm -rf .terraform/{modules,providers}/ common::colorify "yellow" "Re-validating: $dir_path" +echo "common::colorify Re-validating" fi - +echo "after if" validate_output=$(terraform validate "${args[@]}" 2>&1) exit_code=$? - +echo "end" if [ $exit_code -ne 0 ]; then common::colorify "red" "Validation failed: $dir_path" echo -e "$validate_output\n\n" From c23cb25136596852e0ffb41c2bca2538af80a490 Mon Sep 17 00:00:00 2001 From: MaxymVlasov Date: Thu, 24 Nov 2022 18:05:45 +0200 Subject: [PATCH 21/43] t --- hooks/terraform_validate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hooks/terraform_validate.sh b/hooks/terraform_validate.sh index 5e960b8a7..683ae71ab 100755 --- a/hooks/terraform_validate.sh +++ b/hooks/terraform_validate.sh @@ -111,7 +111,7 @@ echo "validate_have_errors" local -i validate_have_errors validate_have_errors=$(find_validate_errors "$validate_output") echo "validate_have_errors == 0" - if [ "$validate_have_errors" == "0" ]; then + if [ "$validate_have_errors" = "0" ]; then return 0 fi From bd66aff9c14e03555ec65de171119150371a9e20 Mon Sep 17 00:00:00 2001 From: MaxymVlasov Date: Thu, 24 Nov 2022 18:06:49 +0200 Subject: [PATCH 22/43] t --- hooks/terraform_validate.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hooks/terraform_validate.sh b/hooks/terraform_validate.sh index 683ae71ab..8ad173355 100755 --- a/hooks/terraform_validate.sh +++ b/hooks/terraform_validate.sh @@ -109,7 +109,9 @@ echo "before if" validate_output=$(terraform validate -json "${args[@]}" 2>&1) echo "validate_have_errors" local -i validate_have_errors - validate_have_errors=$(find_validate_errors "$validate_output") + find_validate_errors "$validate_output" + validate_have_errors=$? + echo "validate_have_errors == 0" if [ "$validate_have_errors" = "0" ]; then return 0 From 0887cd8c1e2bed2f109d152015c1ef7eb78b8a4e Mon Sep 17 00:00:00 2001 From: MaxymVlasov Date: Thu, 24 Nov 2022 18:08:23 +0200 Subject: [PATCH 23/43] drbug --- hooks/terraform_validate.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hooks/terraform_validate.sh b/hooks/terraform_validate.sh index 8ad173355..4cdee0b9d 100755 --- a/hooks/terraform_validate.sh +++ b/hooks/terraform_validate.sh @@ -45,7 +45,7 @@ function find_validate_errors { # Pretty-print error information jq '.diagnostics[]' <<< "$validate_output" - +echo "from module before while" # Parse error message. while IFS= read -r error_message; do summary=$(jq -rc '.summary' <<< "$error_message") @@ -57,6 +57,7 @@ function find_validate_errors { "Could not load plugin") return 1 ;; esac done < <(jq -rc '.diagnostics[]' <<< "$validate_output") +echo "from module after while" return 0 } From b0800b293a1b77364cf3c712f3ad83370589e246 Mon Sep 17 00:00:00 2001 From: MaxymVlasov Date: Thu, 24 Nov 2022 18:09:15 +0200 Subject: [PATCH 24/43] debug --- hooks/terraform_validate.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hooks/terraform_validate.sh b/hooks/terraform_validate.sh index 4cdee0b9d..2aa9f482c 100755 --- a/hooks/terraform_validate.sh +++ b/hooks/terraform_validate.sh @@ -36,13 +36,13 @@ function find_validate_errors { local valid local summary - +echo "module before valid" valid=$(jq -rc '.valid' <<< "$validate_output") - +echo "module valid" if [ "$valid" == "true" ]; then return 0 fi - +echo "module if valid after" # Pretty-print error information jq '.diagnostics[]' <<< "$validate_output" echo "from module before while" From 39604c49b99a35db1a8aa970d527af3c07e7593f Mon Sep 17 00:00:00 2001 From: MaxymVlasov Date: Thu, 24 Nov 2022 18:11:20 +0200 Subject: [PATCH 25/43] remove debug and useless --- hooks/terraform_validate.sh | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/hooks/terraform_validate.sh b/hooks/terraform_validate.sh index 2aa9f482c..a53cc5fa8 100755 --- a/hooks/terraform_validate.sh +++ b/hooks/terraform_validate.sh @@ -36,16 +36,13 @@ function find_validate_errors { local valid local summary -echo "module before valid" + valid=$(jq -rc '.valid' <<< "$validate_output") -echo "module valid" + if [ "$valid" == "true" ]; then return 0 fi -echo "module if valid after" - # Pretty-print error information - jq '.diagnostics[]' <<< "$validate_output" -echo "from module before while" + # Parse error message. while IFS= read -r error_message; do summary=$(jq -rc '.summary' <<< "$error_message") @@ -57,7 +54,6 @@ echo "from module before while" "Could not load plugin") return 1 ;; esac done < <(jq -rc '.diagnostics[]' <<< "$validate_output") -echo "from module after while" return 0 } @@ -100,20 +96,19 @@ function per_dir_hook_unique_part { ;; esac done -echo "init 1" + common::terraform_init 'terraform validate' "$dir_path" || { exit_code=$? return $exit_code } -echo "before if" + if [ "$retry_once_with_cleanup" == "true" ]; then validate_output=$(terraform validate -json "${args[@]}" 2>&1) -echo "validate_have_errors" + local -i validate_have_errors find_validate_errors "$validate_output" validate_have_errors=$? -echo "validate_have_errors == 0" if [ "$validate_have_errors" = "0" ]; then return 0 fi @@ -124,12 +119,11 @@ echo "validate_have_errors == 0" # `.terraform` dir completely. rm -rf .terraform/{modules,providers}/ common::colorify "yellow" "Re-validating: $dir_path" -echo "common::colorify Re-validating" fi -echo "after if" + validate_output=$(terraform validate "${args[@]}" 2>&1) exit_code=$? -echo "end" + if [ $exit_code -ne 0 ]; then common::colorify "red" "Validation failed: $dir_path" echo -e "$validate_output\n\n" From 3171311839cfdc1d07fb794e14114c815599fca9 Mon Sep 17 00:00:00 2001 From: MaxymVlasov Date: Thu, 24 Nov 2022 18:12:52 +0200 Subject: [PATCH 26/43] Add tf re-init --- hooks/terraform_validate.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hooks/terraform_validate.sh b/hooks/terraform_validate.sh index a53cc5fa8..9c9ef13ae 100755 --- a/hooks/terraform_validate.sh +++ b/hooks/terraform_validate.sh @@ -118,6 +118,12 @@ function per_dir_hook_unique_part { # which stores info about current TF workspace, so we can't just remove # `.terraform` dir completely. rm -rf .terraform/{modules,providers}/ + + common::terraform_init 'terraform validate' "$dir_path" || { + exit_code=$? + return $exit_code + } + common::colorify "yellow" "Re-validating: $dir_path" fi From a13ecf9f2d610e643c4a7a5eb103028cf95a1a27 Mon Sep 17 00:00:00 2001 From: MaxymVlasov Date: Thu, 24 Nov 2022 18:21:34 +0200 Subject: [PATCH 27/43] debug --- hooks/terraform_validate.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hooks/terraform_validate.sh b/hooks/terraform_validate.sh index 9c9ef13ae..44c4c479a 100755 --- a/hooks/terraform_validate.sh +++ b/hooks/terraform_validate.sh @@ -119,10 +119,14 @@ function per_dir_hook_unique_part { # `.terraform` dir completely. rm -rf .terraform/{modules,providers}/ +echo before reinit +ls .terraform common::terraform_init 'terraform validate' "$dir_path" || { exit_code=$? return $exit_code } +echo after reinit +ls .terraform common::colorify "yellow" "Re-validating: $dir_path" fi From 2bdf052b9dad0770b01e286b42249928fc985269 Mon Sep 17 00:00:00 2001 From: MaxymVlasov Date: Thu, 24 Nov 2022 18:24:52 +0200 Subject: [PATCH 28/43] debug --- hooks/terraform_validate.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hooks/terraform_validate.sh b/hooks/terraform_validate.sh index 44c4c479a..05af36511 100755 --- a/hooks/terraform_validate.sh +++ b/hooks/terraform_validate.sh @@ -119,8 +119,9 @@ function per_dir_hook_unique_part { # `.terraform` dir completely. rm -rf .terraform/{modules,providers}/ -echo before reinit +echo before reinit $(ls .terraform) ls .terraform +pwd common::terraform_init 'terraform validate' "$dir_path" || { exit_code=$? return $exit_code From ac70245d60e077a6da851b47de25c83e746685ac Mon Sep 17 00:00:00 2001 From: MaxymVlasov Date: Thu, 24 Nov 2022 18:32:09 +0200 Subject: [PATCH 29/43] debug --- hooks/_common.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hooks/_common.sh b/hooks/_common.sh index 0e9454458..7fc62d6cd 100644 --- a/hooks/_common.sh +++ b/hooks/_common.sh @@ -293,22 +293,22 @@ function common::terraform_init { local exit_code=0 local init_output - +echo "terraform_init" # Suppress terraform init color if [ "$PRE_COMMIT_COLOR" = "never" ]; then TF_INIT_ARGS+=("-no-color") fi - +echo "terraform_init2" if [ ! -d .terraform ]; then init_output=$(terraform init -backend=false "${TF_INIT_ARGS[@]}" 2>&1) exit_code=$? - +echo "terraform_init3" if [ $exit_code -ne 0 ]; then common::colorify "red" "'terraform init' failed, '$command_name' skipped: $dir_path" echo -e "$init_output\n\n" fi fi - +echo "terraform_init4" return $exit_code } From aba9811726ea5e41232fd5202ce0462122847544 Mon Sep 17 00:00:00 2001 From: MaxymVlasov Date: Thu, 24 Nov 2022 18:33:59 +0200 Subject: [PATCH 30/43] Update tf init logic --- h | 2296 ++++++++++++++++++++++++++++++++++++++++++++++ hooks/_common.sh | 10 +- 2 files changed, 2301 insertions(+), 5 deletions(-) create mode 100644 h diff --git a/h b/h new file mode 100644 index 000000000..c84f4a309 --- /dev/null +++ b/h @@ -0,0 +1,2296 @@ +commit ac70245d60e077a6da851b47de25c83e746685ac (HEAD -> retry_once_with_cleanup, origin/retry_once_with_cleanup) +Author: MaxymVlasov +Date: Thu Nov 24 18:32:09 2022 +0200 + + debug + +commit 2bdf052b9dad0770b01e286b42249928fc985269 +Author: MaxymVlasov +Date: Thu Nov 24 18:24:52 2022 +0200 + + debug + +commit a13ecf9f2d610e643c4a7a5eb103028cf95a1a27 +Author: MaxymVlasov +Date: Thu Nov 24 18:21:34 2022 +0200 + + debug + +commit 3171311839cfdc1d07fb794e14114c815599fca9 +Author: MaxymVlasov +Date: Thu Nov 24 18:12:52 2022 +0200 + + Add tf re-init + +commit 39604c49b99a35db1a8aa970d527af3c07e7593f +Author: MaxymVlasov +Date: Thu Nov 24 18:11:20 2022 +0200 + + remove debug and useless + +commit b0800b293a1b77364cf3c712f3ad83370589e246 +Author: MaxymVlasov +Date: Thu Nov 24 18:09:15 2022 +0200 + + debug + +commit 0887cd8c1e2bed2f109d152015c1ef7eb78b8a4e +Author: MaxymVlasov +Date: Thu Nov 24 18:08:23 2022 +0200 + + drbug + +commit bd66aff9c14e03555ec65de171119150371a9e20 +Author: MaxymVlasov +Date: Thu Nov 24 18:06:49 2022 +0200 + + t + +commit c23cb25136596852e0ffb41c2bca2538af80a490 +Author: MaxymVlasov +Date: Thu Nov 24 18:05:45 2022 +0200 + + t + +commit 7a7a621673440f890eb212d5cdd2062a38f588c9 +Author: MaxymVlasov +Date: Thu Nov 24 18:04:39 2022 +0200 + + debug + +commit c2d5c425c5919a46a61b553b16142c7d5eed7a2d +Author: MaxymVlasov +Date: Thu Nov 24 18:02:19 2022 +0200 + + f + +commit 7574616c2a72869d55fb90ee9caf0bc485e0a835 +Author: MaxymVlasov +Date: Thu Nov 24 18:00:26 2022 +0200 + + f + +commit d4764475f873d43b0222f6bd51953d021d34d350 +Author: MaxymVlasov +Date: Thu Nov 24 17:57:02 2022 +0200 + + Simplify codebase + +commit c0d169d95476a5b2fd06bdf9dbdf19c67e1ce20f +Author: MaxymVlasov +Date: Thu Nov 24 17:42:05 2022 +0200 + + fixup + +commit b3e420b84a7bd76a3269540bef990cdc60ba9a1c +Author: MaxymVlasov +Date: Thu Nov 24 17:34:11 2022 +0200 + + Add tf init + +commit 8a60156a74ae851dca57bbf1adc8d4dfa8e8c2d7 +Author: MaxymVlasov +Date: Thu Nov 24 17:30:13 2022 +0200 + + fixup + +commit e83def1aa427555cfb362cbc0cdfd4b408635452 +Author: MaxymVlasov +Date: Thu Nov 24 17:21:57 2022 +0200 + + fixup + +commit 3d758f5a0439d92a315b082dacecc13f8b4a57d6 (test) +Author: MaxymVlasov +Date: Thu Nov 24 17:00:18 2022 +0200 + + fixup + +commit a65aaab5c2967c5ce58e7c80253648fa18def47f +Author: MaxymVlasov +Date: Thu Nov 24 16:57:11 2022 +0200 + + Fixup + +commit a756cc634ef46439428caf3327a02494bb5667f8 +Author: Maksym Vlasov +Date: Thu Nov 24 16:37:46 2022 +0200 + + Apply suggestions from code review + +commit 4699596819ef5a371f951aa4de2ea9b3e0cf1651 +Author: MaxymVlasov +Date: Thu Nov 24 16:36:08 2022 +0200 + + Improve readability, remove magic numbers + +commit 2e9485351f969874fbb979fa9cef97a048d65051 +Author: MaxymVlasov +Date: Thu Nov 24 16:27:04 2022 +0200 + + Deduplicate code + +commit d99140c6a5523e15ffcbcee60f9b5fe09836fec2 +Author: Bjorn Olsen +Date: Fri Nov 18 13:01:21 2022 +0200 + + Update 3 + +commit 0e556edbddc0940762870941d73815982059eaf7 +Author: MaxymVlasov +Date: Fri Nov 4 21:13:50 2022 +0200 + + Set constant warning-note style accross README + +commit de51a54bea63694af835ff3b8d96d90b41f18221 +Author: MaxymVlasov +Date: Fri Nov 4 20:55:34 2022 +0200 + + Clarify when jq needed. Without it - adding jq dep - is BREAKING CHANGE + +commit 1541f3b964f732a455b9255a0d0f9442cb78efd0 +Author: MaxymVlasov +Date: Fri Nov 4 20:51:46 2022 +0200 + + Fix README + +commit 6cf6f32a9f4a8b98c7e44d173c86f705b1c6df11 +Author: Bjorn Olsen +Date: Fri Nov 4 07:13:33 2022 +0200 + + Update 2 + +commit c1035428a279ca8ef63e5d028aa323a7816c8466 +Author: Bjorn Olsen +Date: Fri Oct 28 11:29:08 2022 +0200 + + Update 1 + +commit a7e3d90daeac7b74b7231a68078cec614c8aae3d +Author: Bjorn Olsen +Date: Fri Oct 21 09:39:42 2022 +0200 + + feat: Add --retry-once-with-cleanup to `terraform_validate` + +commit 07c6764c309d14fd37536e6c679354ab99c59a59 (origin/master, origin/HEAD, master) +Author: semantic-release-bot +Date: Thu Oct 6 16:16:58 2022 +0000 + + chore(release): version 1.76.0 [skip ci] + + # [1.76.0](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.75.0...v1.76.0) (2022-10-06) + + ### Features + + * Add support for version constraints in `tfupdate` ([#437](https://github.com/antonbabenko/pre-commit-terraform/issues/437)) ([a446642](https://github.com/antonbabenko/pre-commit-terraform/commit/a4466425fb486257cfc672094d92b0fb04fdfe93)) + +commit a4466425fb486257cfc672094d92b0fb04fdfe93 +Author: Maksym Vlasov +Date: Thu Oct 6 19:16:29 2022 +0300 + + feat: Add support for version constraints in `tfupdate` (#437) + +commit f5aa7c83b61c6a2838b1ee67f5c706623fe015cc +Author: semantic-release-bot +Date: Wed Sep 7 12:20:24 2022 +0000 + + chore(release): version 1.75.0 [skip ci] + + # [1.75.0](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.74.2...v1.75.0) (2022-09-07) + + ### Features + + * Allow running container as non-root UID/GID for ownership issues (docker) ([#433](https://github.com/antonbabenko/pre-commit-terraform/issues/433)) ([abc2570](https://github.com/antonbabenko/pre-commit-terraform/commit/abc2570e42d3b01b56d34a474eedbf13063d3c31)) + +commit abc2570e42d3b01b56d34a474eedbf13063d3c31 +Author: John Schutz <328434+tofupup@users.noreply.github.com> +Date: Wed Sep 7 07:19:52 2022 -0500 + + feat: Allow running container as non-root UID/GID for ownership issues (docker) (#433) + + Co-authored-by: George L. Yermulnik + Co-authored-by: MaxymVlasov + Co-authored-by: Anton Babenko + +commit 005134b4d3bd8f51323969e49cc1b6eca4352240 +Author: semantic-release-bot +Date: Fri Sep 2 07:51:39 2022 +0000 + + chore(release): version 1.74.2 [skip ci] + + ## [1.74.2](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.74.1...v1.74.2) (2022-09-02) + + ### Bug Fixes + + * Fixed url for wrappers in generated README (terraform_wrapper_module_for_each) ([#429](https://github.com/antonbabenko/pre-commit-terraform/issues/429)) ([fe29c6c](https://github.com/antonbabenko/pre-commit-terraform/commit/fe29c6c71abf31e5e7fbba6ed1d3555971e89ee4)) + +commit fe29c6c71abf31e5e7fbba6ed1d3555971e89ee4 +Author: Anton Babenko +Date: Fri Sep 2 09:51:03 2022 +0200 + + fix: Fixed url for wrappers in generated README (terraform_wrapper_module_for_each) (#429) + +commit 7317961a9fa421ec73c0f7d75374c042bd245ea5 +Author: LiranV +Date: Thu Sep 1 09:59:39 2022 +0300 + + docs: Fix README tflint example (#428) + +commit deb84bbb86160281c32164cdd002c3b9c71ec2bc +Author: Maksym Vlasov +Date: Thu Aug 4 16:18:30 2022 +0300 + + chore: Add new deps to check to issue template (#424) + +commit c767653cf4f9be210d91048b307898a52a69fe18 +Author: Maksym Vlasov +Date: Tue Aug 2 21:46:23 2022 +0300 + + chore: Fix `terraform_validate` exclude example (#422) + +commit be52a7205629205f5660e905a0d6b93029223084 +Author: Gyeongjun Paik +Date: Tue Jul 26 20:29:00 2022 +0900 + + Update README.md + + fix yaml syntax + +commit fd3428655ec83e52f0a4e8480d02d9164ff0846c +Author: Maksym Vlasov +Date: Thu Jul 14 16:14:14 2022 +0300 + + chore: Fix maintenance badge + +commit a78104c3601aa9ec4fa02d1638038dad3e0e8f99 +Author: semantic-release-bot +Date: Wed Jul 13 15:24:08 2022 +0000 + + chore(release): version 1.74.1 [skip ci] + + ## [1.74.1](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.74.0...v1.74.1) (2022-07-13) + + ### Bug Fixes + + * Passed scenario in `terraform_docs` hook now works as expected ([7ac2736](https://github.com/antonbabenko/pre-commit-terraform/commit/7ac2736ab9544455b06fb66f2fb40d3609a010b6)) + +commit 7ac2736ab9544455b06fb66f2fb40d3609a010b6 +Author: MaxymVlasov +Date: Wed Jul 13 16:41:50 2022 +0300 + + fix: Passed scenario in `terraform_docs` hook now works as expected + +commit b425e23e23c509a6c92ee4ba248739af9a70b253 +Author: Maksym Vlasov +Date: Wed Jul 13 15:19:04 2022 +0300 + + chore: Add bash version to required info in bug repports + +commit 331e7519737c8ec1df60a8a13ebdfa678b99ddc5 +Author: semantic-release-bot +Date: Tue Jul 12 18:38:35 2022 +0000 + + chore(release): version 1.74.0 [skip ci] + + # [1.74.0](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.73.0...v1.74.0) (2022-07-12) + + ### Bug Fixes + + * Add `--env-vars`, deprecate `--envs` ([#410](https://github.com/antonbabenko/pre-commit-terraform/issues/410)) ([2b35cad](https://github.com/antonbabenko/pre-commit-terraform/commit/2b35cad50fd7fe1c662cab1bfaab2a4ef7baa3c9)) + * Add `--tf-init-args`, deprecate `--init-args` ([#407](https://github.com/antonbabenko/pre-commit-terraform/issues/407)) ([c4f8251](https://github.com/antonbabenko/pre-commit-terraform/commit/c4f8251d302260953c62a6b2116ea89584ce04a6)) + + ### Features + + * Add support for set env vars inside hook runtime ([#408](https://github.com/antonbabenko/pre-commit-terraform/issues/408)) ([d490231](https://github.com/antonbabenko/pre-commit-terraform/commit/d4902313ce11cc12c738397463f307b830a9ba3e)) + * Allow `terraform_providers_lock` specify terraform init args ([#406](https://github.com/antonbabenko/pre-commit-terraform/issues/406)) ([32b232f](https://github.com/antonbabenko/pre-commit-terraform/commit/32b232f039ceee24b2db8e09de57047c78c6005b)) + * Suppress color for all hooks if `PRE_COMMIT_COLOR=never` set ([#409](https://github.com/antonbabenko/pre-commit-terraform/issues/409)) ([b12f0c6](https://github.com/antonbabenko/pre-commit-terraform/commit/b12f0c662c4ebd104b27880fc380854590c0ca22)) + +commit 2b35cad50fd7fe1c662cab1bfaab2a4ef7baa3c9 +Author: Maksym Vlasov +Date: Wed Jul 6 15:41:28 2022 +0300 + + fix: Add `--env-vars`, deprecate `--envs` (#410) + +commit b12f0c662c4ebd104b27880fc380854590c0ca22 +Author: Maksym Vlasov +Date: Wed Jul 6 15:34:13 2022 +0300 + + feat: Suppress color for all hooks if `PRE_COMMIT_COLOR=never` set (#409) + +commit d4902313ce11cc12c738397463f307b830a9ba3e +Author: Maksym Vlasov +Date: Tue Jul 5 19:07:01 2022 +0300 + + feat: Add support for set env vars inside hook runtime (#408) + +commit c4f8251d302260953c62a6b2116ea89584ce04a6 +Author: Maksym Vlasov +Date: Tue Jul 5 15:49:10 2022 +0300 + + fix: Add `--tf-init-args`, deprecate `--init-args` (#407) + +commit 32b232f039ceee24b2db8e09de57047c78c6005b +Author: Maksym Vlasov +Date: Tue Jul 5 15:25:30 2022 +0300 + + feat: Allow `terraform_providers_lock` specify terraform init args (#406) + +commit 0f2512248536030781e8bab2eabded73189377c9 +Author: Maksym Vlasov +Date: Tue Jul 5 15:24:58 2022 +0300 + + chore: Implement DRY for HOOK_ID (#405) + +commit 2623b7b8be0a2ffff89e0b1e49425816d7107952 +Author: Maksym Vlasov +Date: Mon Jul 4 21:08:50 2022 +0300 + + chore: Rewrite `terraform_validate` to `common::per_dir_hook` (#404) + + * Refactor: Rewrite `terraform_validate` to `common::per_dir_hook` + * Add ability to specify `--hook-config` in future + +commit 57467c56d491420aa6c89f722b120ac7bea0289b +Author: semantic-release-bot +Date: Mon Jun 27 16:57:41 2022 +0000 + + chore(release): version 1.73.0 [skip ci] + + # [1.73.0](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.72.2...v1.73.0) (2022-06-27) + + ### Features + + * Add __GIT_WORKING_DIR__ to terraform_checkov ([#399](https://github.com/antonbabenko/pre-commit-terraform/issues/399)) ([ae88ed7](https://github.com/antonbabenko/pre-commit-terraform/commit/ae88ed73cfb63398270608d4e68f46bb4424f150)) + +commit ae88ed73cfb63398270608d4e68f46bb4424f150 +Author: Olivier Brisse +Date: Tue Jun 28 02:57:09 2022 +1000 + + feat: Add __GIT_WORKING_DIR__ to terraform_checkov (#399) + +commit 1be6f0218d8e31a5c33284a64c283b62cb9f602a +Author: semantic-release-bot +Date: Tue Jun 21 21:00:23 2022 +0000 + + chore(release): version 1.72.2 [skip ci] + + ## [1.72.2](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.72.1...v1.72.2) (2022-06-21) + + ### Bug Fixes + + * Pre-commit-terraform terraform_validate hook ([#401](https://github.com/antonbabenko/pre-commit-terraform/issues/401)) ([d9f482c](https://github.com/antonbabenko/pre-commit-terraform/commit/d9f482c0c6fa0bd464bbaa7444b4f853f1bc4fb9)) + +commit d9f482c0c6fa0bd464bbaa7444b4f853f1bc4fb9 +Author: Nicholas Henry +Date: Tue Jun 21 14:59:41 2022 -0600 + + fix: Pre-commit-terraform terraform_validate hook (#401) + +commit 598bf2c7edd92f559b25655b899c4c41fb4d735b +Author: Ali Khajeh-Hosseini +Date: Thu Jun 9 13:05:35 2022 -0700 + + docs: Fix Infracost links (#396) + +commit 09e9baa769c997f1373c5ec677d879e6b34f48c1 +Author: Maksym Vlasov +Date: Tue Jun 7 13:04:00 2022 +0300 + + chore: Add Windows-related instructions (#395) + +commit 4619ee245c65077a86d931c2f9d5663475720c74 +Author: Anton Babenko +Date: Fri May 27 11:00:37 2022 +0200 + + docs: Updated docs for infracost_breakdown to match Infracost 0.10 (#392) + +commit a7b90d085ceac7e3944ed3dcf54e4da702344c4f +Author: semantic-release-bot +Date: Wed May 25 13:38:30 2022 +0000 + + chore(release): version 1.72.1 [skip ci] + + ## [1.72.1](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.72.0...v1.72.1) (2022-05-25) + + ### Bug Fixes + + * Fixed `terraform_fmt` with `tfenv`, when `terraform` default version is not specified ([#389](https://github.com/antonbabenko/pre-commit-terraform/issues/389)) ([1b9476a](https://github.com/antonbabenko/pre-commit-terraform/commit/1b9476a2798f49c474cb59e812ddaf66b2cc6ca2)) + +commit 1b9476a2798f49c474cb59e812ddaf66b2cc6ca2 +Author: Maksym Vlasov +Date: Wed May 25 16:37:55 2022 +0300 + + fix: Fixed `terraform_fmt` with `tfenv`, when `terraform` default version is not specified (#389) + +commit 57dff323966237d21c44200ef191a5c9f9c3f56a +Author: semantic-release-bot +Date: Wed May 25 12:32:00 2022 +0000 + + chore(release): version 1.72.0 [skip ci] + + # [1.72.0](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.71.0...v1.72.0) (2022-05-25) + + ### Features + + * When a config file is given, do not specify formatter on cli (terraform_docs) ([#386](https://github.com/antonbabenko/pre-commit-terraform/issues/386)) ([962054b](https://github.com/antonbabenko/pre-commit-terraform/commit/962054b923e7a4fff5338fd3f5cb76f957797dd3)) + +commit 962054b923e7a4fff5338fd3f5cb76f957797dd3 +Author: Lawrence <34475808+acodeninja@users.noreply.github.com> +Date: Wed May 25 13:31:24 2022 +0100 + + feat: When a config file is given, do not specify formatter on cli (terraform_docs) (#386) + +commit 5e927033d4080bc2a536972818b88196429926c1 +Author: Maksym Vlasov +Date: Wed May 18 19:00:39 2022 +0300 + + chore: Fix README (#387) + +commit 51147f1712117fa4d2c902cf6c9066c4fc8cafab +Author: Maksym Vlasov +Date: Mon May 16 14:03:56 2022 +0300 + + chore: Updated repo for `terrascan` (#384) + +commit 0f9beffdb93cc6e6001576c4c85ccdf8ff38f9f0 +Author: David Price +Date: Wed May 11 17:07:10 2022 -0500 + + fix hcledit brew install command (#383) + +commit 80ec2dd04d5b8a8250e28a6a00e24136d3f48aeb +Author: Maksym Vlasov +Date: Wed May 11 19:31:47 2022 +0300 + + chore: Clarify `terraform-docs` config usage (#381) + +commit 74a2e54f236a84754449045e0cf5e12f66c68c4d +Author: semantic-release-bot +Date: Mon May 2 17:59:45 2022 +0000 + + chore(release): version 1.71.0 [skip ci] + + # [1.71.0](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.70.1...v1.71.0) (2022-05-02) + + ### Features + + * Added terraform_wrapper_module_for_each hook ([#376](https://github.com/antonbabenko/pre-commit-terraform/issues/376)) ([e4e9a73](https://github.com/antonbabenko/pre-commit-terraform/commit/e4e9a73d7eb8182bcad5ffca17876d1c0a4a8a49)) + +commit e4e9a73d7eb8182bcad5ffca17876d1c0a4a8a49 +Author: Anton Babenko +Date: Mon May 2 19:59:08 2022 +0200 + + feat: Added terraform_wrapper_module_for_each hook (#376) + +commit aededd0eca2411bb10598b2fd91b32ff251ccff7 +Author: semantic-release-bot +Date: Thu Apr 28 07:07:09 2022 +0000 + + chore(release): version 1.70.1 [skip ci] + + ## [1.70.1](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.70.0...v1.70.1) (2022-04-28) + + ### Bug Fixes + + * Fixed `tfupdate` to work in all cases, not only `pre-commit run --all` ([#375](https://github.com/antonbabenko/pre-commit-terraform/issues/375)) ([297cc75](https://github.com/antonbabenko/pre-commit-terraform/commit/297cc757879f25bed6d3adf3b6254cf0d37b17c2)) + +commit 297cc757879f25bed6d3adf3b6254cf0d37b17c2 +Author: Maksym Vlasov +Date: Thu Apr 28 10:06:32 2022 +0300 + + fix: Fixed `tfupdate` to work in all cases, not only `pre-commit run --all` (#375) + +commit 8668ade969c097cd0fecd6a598bac6e2891d052f +Author: semantic-release-bot +Date: Thu Apr 28 07:05:29 2022 +0000 + + chore(release): version 1.70.0 [skip ci] + + # [1.70.0](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.69.0...v1.70.0) (2022-04-28) + + ### Features + + * Add support for `pre-commit/pre-commit-hooks` in Docker image ([#374](https://github.com/antonbabenko/pre-commit-terraform/issues/374)) ([017da74](https://github.com/antonbabenko/pre-commit-terraform/commit/017da745d0817f94b44c3c773e4aa8d42a80aa09)) + +commit 017da745d0817f94b44c3c773e4aa8d42a80aa09 +Author: Jonathan Forget +Date: Thu Apr 28 09:04:53 2022 +0200 + + feat: Add support for `pre-commit/pre-commit-hooks` in Docker image (#374) + +commit b4d8fd9752605956ae40ab72c7572d97b41fc3c7 +Author: semantic-release-bot +Date: Tue Apr 26 10:34:28 2022 +0000 + + chore(release): version 1.69.0 [skip ci] + + # [1.69.0](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.68.1...v1.69.0) (2022-04-26) + + ### Features + + * Allow env vars expansion in `--args` section for all hooks ([#363](https://github.com/antonbabenko/pre-commit-terraform/issues/363)) ([caa01c3](https://github.com/antonbabenko/pre-commit-terraform/commit/caa01c30b33a5a829b75ee6a9e9e08a534a42216)) + +commit caa01c30b33a5a829b75ee6a9e9e08a534a42216 +Author: Maksym Vlasov +Date: Tue Apr 26 13:33:58 2022 +0300 + + feat: Allow env vars expansion in `--args` section for all hooks (#363) + +commit 95ca35646c9f1a997498f7dc7d4af9b48daffbeb +Author: semantic-release-bot +Date: Wed Apr 20 12:11:35 2022 +0000 + + chore(release): version 1.68.1 [skip ci] + + ## [1.68.1](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.68.0...v1.68.1) (2022-04-20) + + ### Bug Fixes + + * Fixed git fatal error in Dockerfile ([#372](https://github.com/antonbabenko/pre-commit-terraform/issues/372)) ([c3f8dd4](https://github.com/antonbabenko/pre-commit-terraform/commit/c3f8dd40e6d6867c661e2495f8194ee7bd9c7fdd)) + +commit c3f8dd40e6d6867c661e2495f8194ee7bd9c7fdd +Author: Maksym Vlasov +Date: Wed Apr 20 15:10:59 2022 +0300 + + fix: Fixed git fatal error in Dockerfile (#372) + +commit cee7608f4b6355385cbf6078c95b7322ac2d5f91 +Author: semantic-release-bot +Date: Mon Apr 18 16:17:47 2022 +0000 + + chore(release): version 1.68.0 [skip ci] + + # [1.68.0](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.67.0...v1.68.0) (2022-04-18) + + ### Features + + * Removed `coreutils` (realpath) from dependencies for MacOS ([#368](https://github.com/antonbabenko/pre-commit-terraform/issues/368)) ([944a2e5](https://github.com/antonbabenko/pre-commit-terraform/commit/944a2e5fefd50df6130c68bcaa4beb4d770c11b9)) + +commit 944a2e5fefd50df6130c68bcaa4beb4d770c11b9 +Author: Maksym Vlasov +Date: Mon Apr 18 19:17:15 2022 +0300 + + feat: Removed `coreutils` (realpath) from dependencies for MacOS (#368) + +commit 4874cfe42e447c29f630d3394df43543f9715f24 +Author: Maksym Vlasov +Date: Sat Apr 16 19:06:58 2022 +0300 + + chore: Add docker image tests - `container-structure-test-config` and `dive-ci` (#365) + +commit f1822ed810dcb545a08105c124b85f7cf5bf25f7 +Author: Maksym Vlasov +Date: Sat Apr 16 15:51:12 2022 +0300 + + docs: Document `--terraform-plan-flags` usage limitations for infracost (#364) + +commit ee8c60e3005fdb20962a5a2551139f8e9fd909f4 +Author: Maksym Vlasov +Date: Sat Apr 16 15:30:05 2022 +0300 + + chore: Avoid mention issue 123 during releases (#366) + +commit c5462f6bf9a4cac24b52fde3ec567424246cbb71 +Author: semantic-release-bot +Date: Fri Apr 15 17:27:01 2022 +0000 + + chore(release): version 1.67.0 [skip ci] + + # [1.67.0](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.66.0...v1.67.0) (2022-04-15) + + ### Features + + * Added `terraform_checkov` (run per folder), deprecated `checkov` hook ([#290](https://github.com/antonbabenko/pre-commit-terraform/issues/290)) ([e3a9834](https://github.com/antonbabenko/pre-commit-terraform/commit/e3a98345bb3be407c476749496827b418b81241c)) + +commit e3a98345bb3be407c476749496827b418b81241c +Author: Bruno Ferreira +Date: Fri Apr 15 18:26:33 2022 +0100 + + feat: Added `terraform_checkov` (run per folder), deprecated `checkov` hook (#290) + +commit b35dc171d8092c86452b433cb0cefa622fdb0921 +Author: semantic-release-bot +Date: Wed Apr 13 17:25:38 2022 +0000 + + chore(release): version 1.66.0 [skip ci] + + # [1.66.0](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.65.1...v1.66.0) (2022-04-13) + + ### Features + + * Added support for `tfupdate` to update version constraints in Terraform configurations ([#342](https://github.com/antonbabenko/pre-commit-terraform/issues/342)) ([ef7a0f2](https://github.com/antonbabenko/pre-commit-terraform/commit/ef7a0f2b467d20f30341d25df3d4012cff2194ec)) + +commit ef7a0f2b467d20f30341d25df3d4012cff2194ec +Author: Julien Rottenberg +Date: Wed Apr 13 10:25:04 2022 -0700 + + feat: Added support for `tfupdate` to update version constraints in Terraform configurations (#342) + +commit 35c45509eeca95a711900c694a414f57ddd0b41d +Author: Maksym Vlasov +Date: Wed Apr 13 19:51:45 2022 +0300 + + chore: Fix docker test pipeline (#362) + +commit ca6737c0efd51137609065510630ea24ce632a9e +Author: semantic-release-bot +Date: Wed Apr 13 16:11:15 2022 +0000 + + chore(release): version 1.65.1 [skip ci] + + ## [1.65.1](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.65.0...v1.65.1) (2022-04-13) + + ### Bug Fixes + + * Improve `tflint --init` command execution ([#361](https://github.com/antonbabenko/pre-commit-terraform/issues/361)) ([d31cb69](https://github.com/antonbabenko/pre-commit-terraform/commit/d31cb6936376bd1aaa9ada83021c29e6ca6727e0)) + +commit d31cb6936376bd1aaa9ada83021c29e6ca6727e0 +Author: Maksym Vlasov +Date: Wed Apr 13 19:10:40 2022 +0300 + + fix: Improve `tflint --init` command execution (#361) + +commit 896cbff5ed5bee27ad8ad20245719f97966aa6ee +Author: semantic-release-bot +Date: Wed Apr 13 14:23:07 2022 +0000 + + chore(release): version 1.65.0 [skip ci] + + # [1.65.0](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.64.1...v1.65.0) (2022-04-13) + + ### Features + + * Adding init to terraform_tflint hook ([#352](https://github.com/antonbabenko/pre-commit-terraform/issues/352)) ([1aff30f](https://github.com/antonbabenko/pre-commit-terraform/commit/1aff30f2a4cb0df65a1e693690b5225a112cf621)) + +commit 1aff30f2a4cb0df65a1e693690b5225a112cf621 +Author: Andrew Glenn <29951057+andrew-glenn@users.noreply.github.com> +Date: Wed Apr 13 09:15:15 2022 -0500 + + feat: Adding init to terraform_tflint hook (#352) + +commit ac54720b9185ae3fc960af48769e80c01bfdaac2 +Author: Maksym Vlasov +Date: Wed Apr 13 17:04:07 2022 +0300 + + chore: Fix linter (#360) + +commit 9627c48349c7ddf93968c5c05435372a9b52ed7f +Author: semantic-release-bot +Date: Thu Mar 31 12:39:27 2022 +0000 + + chore(release): version 1.64.1 [skip ci] + + ## [1.64.1](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.64.0...v1.64.1) (2022-03-31) + + ### Bug Fixes + + * Make hooks bash 3.2 compatible ([#339](https://github.com/antonbabenko/pre-commit-terraform/issues/339)) ([4ad825d](https://github.com/antonbabenko/pre-commit-terraform/commit/4ad825d8d39254c69f0e01fb3e7728f0be9acbb9)) + +commit 4ad825d8d39254c69f0e01fb3e7728f0be9acbb9 +Author: Maksym Vlasov +Date: Thu Mar 31 15:38:51 2022 +0300 + + fix: Make hooks bash 3.2 compatible (#339) + +commit 7e6c287d16bf71df3ee926ab52747a81ebed0068 +Author: Maksym Vlasov +Date: Tue Mar 15 17:20:05 2022 +0200 + + chore: Actualize README (#350) + +commit 908ec70ea6dfb7d448aa69154e67a9795f1c1bd0 +Author: Maksym Vlasov +Date: Mon Mar 14 16:06:34 2022 +0200 + + Add important notes about project (#348) + +commit 83b39d935a22f8f41bd8b2ec529af35b284cd668 +Author: drewmullen +Date: Tue Feb 22 12:30:53 2022 -0500 + + docs: Fix README function `rm_terraform` to not erase .terraform-docs.yaml (#345) + +commit 458fb289a35544484272c55cd35b92c50125dbe1 +Author: Pasquale De Vita <59291437+pasqualedevita@users.noreply.github.com> +Date: Tue Feb 15 14:41:49 2022 +0100 + + chore: Add Docker latest and nightly tag (#343) + +commit e88abb68576841af14a8cd472a9dd9e58846e5a2 +Author: Maksym Vlasov +Date: Thu Feb 10 21:33:05 2022 +0200 + + chore: Fix docker test workflow (#340) + +commit c2d1a58a5e7e448a66f3f8bb561f58ee3c95a461 +Author: semantic-release-bot +Date: Thu Feb 10 18:48:50 2022 +0000 + + chore(release): version 1.64.0 [skip ci] + + # [1.64.0](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.63.0...v1.64.0) (2022-02-10) + + ### Features + + * Improved speed of `pre-commit run -a` for multiple hooks ([#338](https://github.com/antonbabenko/pre-commit-terraform/issues/338)) ([579dc45](https://github.com/antonbabenko/pre-commit-terraform/commit/579dc45fb40bc64c6742d42a9da78eddb0b70e1d)) + +commit 579dc45fb40bc64c6742d42a9da78eddb0b70e1d +Author: Maksym Vlasov +Date: Thu Feb 10 20:48:17 2022 +0200 + + feat: Improved speed of `pre-commit run -a` for multiple hooks (#338) + +commit c266d4036bd63b212a60f9b0264adff360349124 +Author: semantic-release-bot +Date: Thu Feb 10 15:54:13 2022 +0000 + + chore(release): version 1.63.0 [skip ci] + + # [1.63.0](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.62.3...v1.63.0) (2022-02-10) + + ### Features + + * Improve performance during `pre-commit --all (-a)` run ([#327](https://github.com/antonbabenko/pre-commit-terraform/issues/327)) ([7e7c916](https://github.com/antonbabenko/pre-commit-terraform/commit/7e7c91643e8f213168b95d0583f787f914b04ce4)) + +commit 7e7c91643e8f213168b95d0583f787f914b04ce4 +Author: Carlos Miguel Bustillo Rodríguez <20931458+carlosbustillordguez@users.noreply.github.com> +Date: Thu Feb 10 16:53:37 2022 +0100 + + feat: Improve performance during `pre-commit --all (-a)` run (#327) + +commit a80d3835d402bc95cfd174ec0ffa0de1134ddc1c +Author: Maksym Vlasov +Date: Thu Feb 10 17:51:09 2022 +0200 + + chore: fix bug intoduced in #316 (#335) + +commit 441e87a08ccb74a1750c029ee647796ba9844932 +Author: Mark Bainter +Date: Thu Feb 3 14:23:59 2022 -0600 + + docs: Add workaround for configuration_aliases tf bug (#332) + +commit 71647bb026d36db21271c95bd120c29edc00737c +Author: Mohit Saxena <76725454+mohitsaxenaknoldus@users.noreply.github.com> +Date: Wed Jan 12 02:06:35 2022 +0530 + + chore: Add Github Actions Workflow to build if Dockerfile updated (#318) + + Co-authored-by: Maksym Vlasov + +commit 47229003ffdc34e0644302c8526f71d1b114c82c +Author: Maksym Vlasov +Date: Tue Jan 11 19:20:29 2022 +0200 + + chore: Add hadolint check for Dockerfiles (#322) + + Co-authored-by: Balazs Hamorszky + +commit 321fb1669366f3087f6942af463b2d355120451a +Author: Maksym Vlasov +Date: Tue Jan 11 15:54:42 2022 +0200 + + chore: Document functions (based on google style guide) (#317) + +commit 661a0cf3463510156b388b18ef7a0c49db2f4ae9 +Author: Maksym Vlasov +Date: Tue Jan 11 13:12:29 2022 +0200 + + chore: Specify what we exactly mean (#320) + +commit c5f2a618a83f04113a3a27475663a709e2c83f5f +Author: Maksym Vlasov +Date: Thu Jan 6 17:09:51 2022 +0200 + + chore: Improved code structure (moved hooks into a separate dir) (#316) + +commit 3045dd55a3c0c5557f707ad3b0e841218008d19f +Author: Maksym Vlasov +Date: Thu Jan 6 15:08:18 2022 +0200 + + chore: Add shellcheck and make checks passing (#315) + + Co-authored-by: Anton Babenko + +commit 645f3fd126ba875ed4401ff3dc04dec8e391cbe0 +Author: Maksym Vlasov +Date: Thu Jan 6 13:25:32 2022 +0200 + + chore: Cleanup file with test data (#311) + +commit 1f16f09c6fb7c76af53a48dfce33626197615d51 +Author: Maksym Vlasov +Date: Thu Jan 6 13:21:52 2022 +0200 + + chore: Refactor all hooks (#310) + +commit ac9299cf5747910d46edd12f311a3fd024f1cb90 +Author: semantic-release-bot +Date: Wed Dec 22 18:45:26 2021 +0000 + + chore(release): version 1.62.3 [skip ci] + + ## [1.62.3](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.62.2...v1.62.3) (2021-12-22) + + ### Bug Fixes + + * Check all directories with changes and pass all args in terrascan hook ([#305](https://github.com/antonbabenko/pre-commit-terraform/issues/305)) ([66401d9](https://github.com/antonbabenko/pre-commit-terraform/commit/66401d93f485164fb2272af297df835b932c61c3)) + +commit 66401d93f485164fb2272af297df835b932c61c3 +Author: Carlos Miguel Bustillo Rodríguez <20931458+carlosbustillordguez@users.noreply.github.com> +Date: Wed Dec 22 19:44:53 2021 +0100 + + fix: Check all directories with changes and pass all args in terrascan hook (#305) + +commit 04ecd10343c066e91e3c4b6d53f111a54f0363fa +Author: semantic-release-bot +Date: Tue Dec 21 19:52:23 2021 +0000 + + chore(release): version 1.62.2 [skip ci] + + ## [1.62.2](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.62.1...v1.62.2) (2021-12-21) + + ### Bug Fixes + + * Properly exclude .terraform directory with checkov hook ([#306](https://github.com/antonbabenko/pre-commit-terraform/issues/306)) ([b431a43](https://github.com/antonbabenko/pre-commit-terraform/commit/b431a43ffa6cd13156485ef853c967856e9572ef)) + * Speedup `terrascan` hook up to x3 times in big repos ([#307](https://github.com/antonbabenko/pre-commit-terraform/issues/307)) ([2e8dcf9](https://github.com/antonbabenko/pre-commit-terraform/commit/2e8dcf9298733a256cc7f8c6f05b3ef9a1047a36)) + +commit 096245800e76333b914489abb5157d71aafaebb7 +Author: Maksym Vlasov +Date: Tue Dec 21 21:51:14 2021 +0200 + + chore: Release action should track hooks configuration changes (#308) + +commit 2e8dcf9298733a256cc7f8c6f05b3ef9a1047a36 +Author: Maksym Vlasov +Date: Tue Dec 21 21:50:12 2021 +0200 + + fix: Speedup `terrascan` hook up to x3 times in big repos (#307) + +commit b431a43ffa6cd13156485ef853c967856e9572ef +Author: Maksym Vlasov +Date: Tue Dec 21 21:18:52 2021 +0200 + + fix: Properly exclude .terraform directory with checkov hook (#306) + +commit d826474a12aa312152f01ae97ab5e12881a989fb +Author: semantic-release-bot +Date: Sat Dec 18 21:17:33 2021 +0000 + + chore(release): version 1.62.1 [skip ci] + + ## [1.62.1](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.62.0...v1.62.1) (2021-12-18) + + ### Bug Fixes + + * **terraform_tflint:** Restore current working directory behavior ([#302](https://github.com/antonbabenko/pre-commit-terraform/issues/302)) ([93029dc](https://github.com/antonbabenko/pre-commit-terraform/commit/93029dcfcf6b9b121c24573f3e647d9fde255486)) + +commit 77bd66192f90511f6d859c93c716ed0ddc3ff356 +Author: Anton Babenko +Date: Sat Dec 18 22:15:00 2021 +0100 + + chore: Use valid token for the Release GHA + +commit 93029dcfcf6b9b121c24573f3e647d9fde255486 +Author: Maxime Brunet +Date: Sat Dec 18 10:07:36 2021 -0800 + + fix(terraform_tflint): Restore current working directory behavior (#302) + +commit 59da4b81d61bb512fe6867eb9da713ed3b2a3c57 +Author: Anton Babenko +Date: Mon Dec 13 10:58:27 2021 +0100 + + chore: Publish container image only after the release + +commit 21185f6db4c4ebfb1998bc5aab96585eb8b60e82 +Author: Anton Babenko +Date: Mon Dec 13 10:51:03 2021 +0100 + + chore: Fixed allowed types for PR titles + +commit b8f90bd057594961b2f53d030294420dd781c0bb +Author: Anton Babenko +Date: Sun Dec 12 21:41:23 2021 +0100 + + chore: Updated validation PR title types (#298) + +commit 8c063c782462c2f8638f04d6283882a128a445fd +Author: Anton Babenko +Date: Sun Dec 12 21:08:14 2021 +0100 + + chore: Validate PR title (#297) + +commit e1bccb7585af9fc64c7eeb8af04694cfc700cea0 +Author: semantic-release-bot +Date: Sun Dec 12 19:29:33 2021 +0000 + + chore(release): version 1.62.0 [skip ci] + + # [1.62.0](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.61.0...v1.62.0) (2021-12-12) + + ### Features + + * Added semantic release ([#296](https://github.com/antonbabenko/pre-commit-terraform/issues/296)) ([1bcca44](https://github.com/antonbabenko/pre-commit-terraform/commit/1bcca44d1677128c23d505be644f1d16c320eb4c)) + +commit 1bcca44d1677128c23d505be644f1d16c320eb4c +Author: Anton Babenko +Date: Sun Dec 12 20:28:30 2021 +0100 + + feat: Added semantic release (#296) + +commit 00a5ef032581e4334f3cd3b31bfc9cc93c4b4870 +Author: Anton Babenko +Date: Sat Dec 11 14:34:55 2021 +0100 + + Updated CHANGELOG + +commit 45575c3a434a8a76c1f62de824e5156edf887086 +Author: Maxime Brunet +Date: Sat Dec 11 05:33:22 2021 -0800 + + feat: Pass custom arguments to terraform init in `terraform_validate` hook (#293) + +commit 7c6ad7cfb40d92e8f49cb0a3dd412c7509d5aeda +Author: Bruno Ferreira +Date: Wed Dec 8 21:06:30 2021 +0000 + + fix: analyse all folders with tflint and don't stop on first execution (#289) + +commit 141f815e810dfdd2dc3c5d0c605e883f4e5e14de +Author: Anton Babenko +Date: Wed Dec 8 20:03:43 2021 +0100 + + Updated CHANGELOG + +commit 01d262caaae1fe0a886e5e8e16a58a1bffd5713c +Author: Maksym Vlasov +Date: Wed Dec 8 21:03:04 2021 +0200 + + fix: pre-build docker image (#292) + +commit 31e7ccf1b76b477441136eef21f24b9f91695dda +Author: Anton Babenko +Date: Mon Dec 6 15:57:13 2021 +0100 + + Updated CHANGELOG + +commit 4543f10a8ea1b9c522b931b1c2e3331b832ecfc0 +Author: sg70 +Date: Mon Dec 6 15:55:06 2021 +0100 + + fix: Fixed docker build (#288) + +commit 6a064b19e4730a42cc19b2793f617f97a0d2e262 +Author: Anton Babenko +Date: Sat Nov 20 11:28:49 2021 +0100 + + Updated CHANGELOG + +commit 003cd1da3cce54451aff474420d3a004ec5364f5 +Author: Birger J. Nordølum +Date: Sat Nov 20 11:28:03 2021 +0100 + + chore: Publish container image on release (#285) + +commit 3b4be67fdb4476f7abd36feeba074ab67dc1cad5 +Author: Maksym Vlasov +Date: Wed Nov 17 22:21:09 2021 +0200 + + chore: Fix master merge to working branch on pre-commit autofixes (#286) + +commit c5bcad45bba430466b4171978a9c3d58562d2bfb +Author: Anton Babenko +Date: Wed Nov 17 19:17:50 2021 +0100 + + Updated CHANGELOG + +commit feabecc9b3461fff58e0a29541854d3e7a5402c0 +Author: Milos Jajac +Date: Wed Nov 17 19:16:38 2021 +0100 + + fix: typo in arg name for terraform-docs (#283) + +commit af10d4f082b496a86f1c5cc80e6e1faaedc69c39 +Author: Maksym Vlasov +Date: Mon Nov 8 22:28:02 2021 +0200 + + chore: Add deprecation notice to `terraform_docs_replace` (#280) + +commit d4ae82fa95714afe0370e7967d7818612b85fafc +Author: Anton Babenko +Date: Mon Nov 8 09:53:57 2021 +0100 + + Updated CHANGELOG + +commit 71302a9a56ccd9fee424f4bb978dc4e2e1ac13f2 +Author: Maksym Vlasov +Date: Mon Nov 8 10:51:08 2021 +0200 + + feat: Updated Docker image from Ubuntu to Alpine (#278) + +commit 32dae32273c9a1f4bd20f2425301c669ba5c757c +Author: Maksym Vlasov +Date: Fri Oct 29 16:42:05 2021 +0300 + + chore: Updated messages shown in terraform_tflint hook (#274) + +commit 57b94a29ec2f7aed0e0790c5745282ac93e65749 +Author: Anton Babenko +Date: Wed Oct 27 17:28:30 2021 +0200 + + Updated CHANGELOG + +commit 4c509434e0bd9da72b7f400b0e8a2be01c99bdd8 +Author: Maksym Vlasov +Date: Wed Oct 27 18:28:05 2021 +0300 + + fix: Fixed 1.54.0 where `terraform_docs` was broken (#272) + +commit cf0844cd31cc15ec66bb7cec4056ce8018d05d23 +Author: Anton Babenko +Date: Wed Oct 27 14:40:17 2021 +0200 + + Updated CHANGELOG + +commit e2604eacfaafd878cff351a6ce07c9a02cd5fdc4 +Author: Maksym Vlasov +Date: Wed Oct 27 14:45:25 2021 +0300 + + feat: Add support for quoted values in `infracost_breakdown` `--hook-config` (#269) + +commit 15cac9087438b51de9a29079bf1156668eaf2593 +Author: Anton Babenko +Date: Tue Oct 26 17:40:24 2021 +0200 + + docs: Added notes about sponsors (#268) + +commit 01a6170d3685e8ec5a553cc720fb738dc6cd59d0 +Author: Maksym Vlasov +Date: Tue Oct 26 16:56:41 2021 +0300 + + fix: Fixed args expand in terraform_docs (#260) + +commit bb880b0f91dffb4d9d23651d87ce79f05326cd52 +Author: Anton Babenko +Date: Tue Oct 26 14:40:17 2021 +0200 + + Updated CHANGELOG + +commit 9656159025264c0d50032a48d0e58ad3c15f388b +Author: Anton Babenko +Date: Tue Oct 26 14:39:23 2021 +0200 + + docs: Pre-release 1.53 (#267) + +commit 3d5a882a53f5e446b10e326db0087c2ee58608c8 +Author: Maksym Vlasov +Date: Tue Oct 26 15:35:55 2021 +0300 + + docs: Clarify docs for terraform_tfsec hook (#266) + +commit cff42e6d6fe8cc33f4a7033e7f945e0668c32be8 +Author: Maksym Vlasov +Date: Tue Oct 26 14:12:01 2021 +0300 + + feat: Add infracost_breakdown hook (#252) + +commit cc59119c174106747453473c4a6e3d775c555c60 +Author: Maksym Vlasov +Date: Mon Oct 25 21:31:55 2021 +0300 + + feat: Set up PR reviewers automatically (#258) + +commit a0f69e3ba784762285ad3e097bb33c463340f042 +Author: Maksym Vlasov +Date: Mon Oct 25 21:10:36 2021 +0300 + + docs: fix protocol to prevent MITM (#257) + +commit 2973f85f3ba5f8f5b4610cce9b01a7ce26510c84 +Author: gravitybacklight <2327204+gravitybacklight@users.noreply.github.com> +Date: Thu Oct 21 15:13:34 2021 +0100 + + feat: add __GIT_WORKING_DIR__ to tfsec (#255) + +commit c0b9b3c5622f09123d21570807b0005c57bcb2b5 +Author: Dan Arnold +Date: Tue Oct 19 03:29:27 2021 -0700 + + docs: Add missing space in terrascan install cmd (#253) + +commit e33c654a4005cff364a42f965068160e4ba3e3c2 +Author: Maksym Vlasov +Date: Fri Oct 15 23:09:13 2021 +0300 + + fix: command not found (#251) + +commit 390a2645f281163a04fea78e219eceb00c48addd +Author: Maksym Vlasov +Date: Fri Oct 15 22:11:01 2021 +0300 + + fix: execute tflint once in no errors (#250) + +commit 762f7b252539cbf31d43bd4f89e1eb969f3c8988 +Author: Maksym Vlasov +Date: Fri Oct 15 15:37:49 2021 +0300 + + docs: fix deps (#249) + +commit 7b11401863b29fc8c83a1e74584ac99dc50630ec +Author: Maksym Vlasov +Date: Fri Oct 15 15:26:23 2021 +0300 + + feat: Add `terraform_docs` hook settings (#245) + +commit 3f6643280eb25021d8498e9abf930261377fe829 +Author: Maksym Vlasov +Date: Fri Oct 15 15:24:50 2021 +0300 + + fix: terrafrom_tflint ERROR output for files located in repo root (#243) + +commit 25cddd988093033a6e2ee013571201e4bb89ca47 +Author: Maksym Vlasov +Date: Fri Oct 15 15:19:41 2021 +0300 + + feat: Add support for specify terraform-docs config file (#244) + +commit e6aad1731052de5877672aab897c7e3463f9790d +Author: Maksym Vlasov +Date: Fri Oct 15 15:08:26 2021 +0300 + + docs: Document hooks dependencies (#247) + +commit de2f6249eee3351131017d0899aa6f10107eb568 +Author: Robin Bowes +Date: Thu Oct 14 17:20:25 2021 +0100 + + feat: Allow passing of args to terraform_fmt (#147) + +commit 8a6e4bf4e69060c99a605b53a075db6c1a788d6b +Author: Maksym Vlasov +Date: Thu Oct 14 16:25:45 2021 +0300 + + docs: Add terraform_fmt usage instructions and how-to debug script with args (#242) + +commit 71f7c347c99b30a7275d3f3dddc5364b28394f6c +Author: Maksym Vlasov +Date: Thu Oct 14 14:35:19 2021 +0300 + + fix: TFSec outputs the same results multiple times (#237) + +commit 3ae5eb00b6cee2c4a9f3ee049bfda39d20335312 +Author: Maksym Vlasov +Date: Thu Oct 14 14:23:24 2021 +0300 + + chore: Do not mark issues and PR's in milestone as stale (#241) + +commit 884446e4d6d9687ce78faf3cc372a3e63984e312 +Author: Anton Babenko +Date: Mon Oct 4 13:16:48 2021 +0200 + + Updated CHANGELOG + +commit d69e86d48b5f70db64608d1a2e5cd6067955014c +Author: Sergei Ivanov +Date: Mon Oct 4 12:16:15 2021 +0100 + + feat: Add new hook for `terraform providers lock` operation (#173) + +commit f7e28e1bae20254cb265e71a1cd31b52b4bd1214 +Author: Maksym Vlasov +Date: Fri Oct 1 21:52:35 2021 +0300 + + docs: Document terraform_tfsec args usage (#238) + +commit 013d3084c31b31f1784485f90568dc42ac51ee98 +Author: Maksym Vlasov +Date: Fri Oct 1 19:53:53 2021 +0300 + + docs: Make contributors more visible (#236) + +commit c8fb4081f791071c89e2e9e758344f1e9d1d85e7 +Author: Maksym Vlasov +Date: Fri Oct 1 19:31:14 2021 +0300 + + docs: Add contributing guide and docs about performance tests (#235) + +commit 3404eede1eb643bd33d14f8f069224047b51a739 +Author: Javier Collado +Date: Fri Oct 1 13:29:07 2021 +0200 + + fix: terraform_tflint hook executes in a serial way to run less often (#211) + +commit ce02cd137e59d4f0924d382aa56a9266c2d6fea1 +Author: Maksym Vlasov +Date: Thu Sep 30 17:28:11 2021 +0300 + + feat: Add PATH outputs when TFLint found any problem (#234) + +commit 3bdcf51a978e4ad0dbc3291c1c1ac6692e65b1a3 +Author: balihb +Date: Thu Sep 30 14:23:07 2021 +0200 + + fix: Dockerfile if INSTALL_ALL is not defined (#233) + +commit 98a8e4048f669eb99b38c8f773aa5582eef87741 +Author: Maksym Vlasov +Date: Wed Sep 29 14:36:55 2021 +0300 + + docs: Describe hooks usage and improve examples (#232) + + Co-authored-by: Anton Babenko + +commit cf6603c9493e634e1800dd59cf797977c78ca19d +Author: Maksym Vlasov +Date: Wed Sep 29 12:29:05 2021 +0300 + + chore: Add shfmt to workflow (#231) + +commit ff54bb44aaafa11dcdc20f7884645641a8bcd179 +Author: Sergei Ivanov +Date: Mon Sep 20 14:46:36 2021 +0100 + + fix: remove dead code from terraform-docs script (#229) + +commit 299ef1208b093bce9d6aadbeb1b20576c0c9a0b5 +Author: Anton Babenko +Date: Fri Sep 17 16:48:55 2021 +0200 + + Updated CHANGELOG + +commit b67dbd90496cf5b2846284466a3201c94b1960a8 +Author: Sergei Ivanov +Date: Fri Sep 17 15:48:24 2021 +0100 + + fix: trigger terraform-docs on changes in lock files (#228) + +commit 4faee7b12b741f9c58de438e082571ebe72883da +Author: Maksym Vlasov +Date: Wed Sep 15 13:57:58 2021 +0200 + + fix: label auto-adding after label rename (#226) + +commit 7a8c6e109e1a321dfddfd9617bbe1c50bf440e6d +Author: Maksym Vlasov +Date: Tue Sep 14 13:37:22 2021 +0200 + + chore: Updated GH stale action config (#223) + +commit 53a866e7752885b8854a413fd76e397677050d4c +Author: Maksym Vlasov +Date: Sat Sep 11 10:47:56 2021 +0300 + + feat: Add GH checks and templates (#222) + +commit c920368fb2485e0dde8cd9956adb2cf9fa230da0 +Author: Maksym Vlasov +Date: Fri Sep 10 22:33:03 2021 +0300 + + feat: Add mixed line ending check to prevent possible errors (#221) + +commit ce02f94e46635b23087e29e746f0461c6993fee2 +Author: Maksym Vlasov +Date: Thu Sep 9 22:29:33 2021 +0300 + + fix: Dockerized pre-commit-terraform (#219) + + Co-authored-by: Anton Babenko + +commit 5daffe87271a154e9199c5113540e5ef6438a65a +Author: Maksym Vlasov +Date: Thu Sep 9 12:38:43 2021 +0300 + + docs: Initial docs improvement (#218) + +commit c7d6d002ed510c1a3e63af6d0e132e8abf2448d4 +Author: Lorenz Vanthillo +Date: Tue May 4 16:41:28 2021 +0200 + + chore: Update Ubuntu install method (#198) + +commit 9b84f70efef7419e53c9526dff2e4a7d6bc9c78d +Author: Anton Babenko +Date: Thu Apr 22 22:16:26 2021 +0200 + + Updated CHANGELOG + +commit fee2387b6ce595773cd3437ca2cc4081061f5fbb +Author: Cesar Rodriguez +Date: Thu Apr 22 16:15:00 2021 -0400 + + feat: Adds support for Terrascan (#195) + +commit 96346e74d90467918729f8acafccd56c47e1be68 +Author: Anton Babenko +Date: Tue Apr 20 12:13:58 2021 +0200 + + Updated CHANGELOG + +commit d27074b5a03fb4ccfb9261c9999411af2358a742 +Author: Manuel Vogel +Date: Tue Apr 20 12:13:25 2021 +0200 + + fix: Fix and pin versions in Dockerfile (#193) + +commit fa3859e55f31a921152c0047f67edb62b564ebbc +Author: Sergio Kef +Date: Wed Mar 24 21:12:24 2021 +0100 + + chore: Fix mistake on command (#185) + +commit bec7b5d943953f0c19afb22cbe2eae4689d937f3 +Author: Anton Babenko +Date: Thu Mar 18 09:13:10 2021 +0100 + + Update README.md + +commit 257824c637d2a4ef7843c792eb088dc8bc2c6140 +Author: Anton Babenko +Date: Fri Mar 12 15:36:00 2021 +0100 + + Updated CHANGELOG + +commit 36a269f1093a76a8ef6d603b35cb067380cac70f +Author: Manuel Vogel +Date: Fri Mar 12 15:35:21 2021 +0100 + + chore: add dockerfile (#183) + +commit 53de83359eb2426668266094f5f73ef7651921f9 +Author: Manuel Vogel +Date: Fri Mar 12 10:32:41 2021 +0100 + + docs: Added checkov install (#182) + +commit 47b80ec9d58e38679bc6caae9253efa2d5325b0c +Author: Anton Babenko +Date: Thu Feb 25 20:47:19 2021 +0100 + + Updated CHANGELOG + +commit 90d45213a304bb5b2f90876f6f2621e1a87c92da +Author: chopped pork +Date: Thu Feb 25 19:46:51 2021 +0000 + + fix: remove sed postprocessing from the terraform_docs_replace hook to fix compatibility with terraform-docs 0.11.0+ (#176) + +commit ad5dccae65a1508497dd638c7b511099296edaf3 +Author: Manuel Vogel +Date: Thu Feb 25 17:03:46 2021 +0100 + + docs: updates installs for macOS and ubuntu (#175) + +commit f189a114b1771f473654606105f3edd9288369a7 +Author: Anton Babenko +Date: Sat Feb 20 20:18:54 2021 +0100 + + Updated CHANGELOG + +commit 827af52cd2ab47a67e15ecfa978cf00a53d67065 +Author: Anton Babenko +Date: Sat Feb 20 20:18:07 2021 +0100 + + fix: Terraform validate for submodules (#172) + +commit 4f6e84905971ddf36f486e912f25878b135debe5 +Author: Anton Babenko +Date: Thu Nov 12 11:58:02 2020 +0100 + + Updated CHANGELOG + +commit 3a07570ddb9f8e5a6a3d3fd9164ef6ae8694883e +Author: Shawn +Date: Thu Nov 12 05:55:53 2020 -0500 + + fix: Correct deprecated parameter to terraform-docs (#156) + +commit fe2d121d123cd3147d849dd0a825e534da976008 +Author: Anton Babenko +Date: Mon Nov 2 21:48:24 2020 +0100 + + Updated CHANGELOG + +commit d303bff1f9a7fadc4b22db6a642861de6dfca2c9 +Author: Anton Babenko +Date: Mon Nov 2 21:44:54 2020 +0100 + + feat: Make terraform_validate to run init if necessary (#158) + +commit 84374f64a05e53a23d8e23177db09ae964434f64 +Author: Anton Babenko +Date: Thu Sep 24 21:44:33 2020 +0200 + + Updated CHANGELOG + +commit d773f4ad79e185710ca52fab5f66c0e6c3e6b12c +Author: Evan Stoddard +Date: Thu Sep 24 14:44:05 2020 -0500 + + fix: Fix regex considering terraform-docs v0.10.0 old (#151) + +commit 6b03062a175a01321946fdbb774e655938c97034 +Author: Anton Babenko +Date: Thu Sep 24 13:35:05 2020 +0200 + + Updated CHANGELOG + +commit 81770aa0fab607a0c2472f06c94afc7bff4fdc44 +Author: Matias Zilli +Date: Thu Sep 24 11:37:08 2020 +0200 + + fix: make terraform_docs Windows compatible (#129) + +commit cc4e5e85ba3674d36ea61d85e5d9a1144ae71cb9 +Author: Anton Babenko +Date: Wed Sep 23 22:12:01 2020 +0200 + + Updated CHANGELOG + +commit 6f3b12514bb6c0c39dcdd095b873040411d31d79 +Author: Anton Babenko +Date: Wed Sep 23 22:11:09 2020 +0200 + + fix: terraform-docs version 0.10 removed with-aggregate-type-defaults (#150) + +commit 4a611121b6655127d8f94afca34cf668c81c4ae9 +Author: Anton Babenko +Date: Tue Sep 22 14:22:58 2020 +0200 + + Updated CHANGELOG + +commit cf07b5ea3ff76d82f9352aad6dc37e43aa769f9d +Author: Anton Babenko +Date: Tue Sep 22 14:20:27 2020 +0200 + + feat: Add possibility to share tflint config file for subdirs (#149) + +commit e4ab41045db17eb0e89a87618ffd9482c4818330 +Author: Anton Babenko +Date: Tue Sep 8 15:11:27 2020 +0200 + + Updated CHANGELOG + +commit 293b64c0eaa38bcdd79a5576243bc2949378ff32 +Author: Anton Babenko +Date: Tue Sep 8 15:10:56 2020 +0200 + + feat: Add checkov support (#143) + +commit 45e16de525ef5a48dc3d30b180214c07468571b8 +Author: Anton Babenko +Date: Mon Sep 7 16:04:03 2020 +0200 + + Updated CHANGELOG + +commit f2cab31bc41e913ea63b92b6fc0b3b6e2a2c039a +Author: Sergei Ivanov +Date: Mon Sep 7 14:50:57 2020 +0100 + + fix: Correctly handle arrays in terraform_docs.sh (#141) + +commit f2e3a5f796d7a0d8436b18598e756da528654dcc +Author: Anton Babenko +Date: Tue Sep 1 20:46:37 2020 +0200 + + Updated CHANGELOG + +commit 077c423cc5c8babe13e394cd3e73c86ceefc5191 +Author: nkazarian-spokeo <51686594+nkazarian-spokeo@users.noreply.github.com> +Date: Tue Sep 1 11:45:36 2020 -0700 + + fix: make terraform_tfsec.sh executable (#140) + +commit c8c25ec064bd064ca087d52d2b9ead68b6f58c7a +Author: Anton Babenko +Date: Tue Sep 1 10:09:26 2020 +0200 + + Updated CHANGELOG + +commit 108c75f9798a9cc8a7ecefcf8924cb50edea0ff4 +Author: nkazarian-spokeo <51686594+nkazarian-spokeo@users.noreply.github.com> +Date: Tue Sep 1 01:07:08 2020 -0700 + + feat: have option for terraform_tfsec hook to only run in relevant modified directories (#135) + +commit 266906591c92a974b30cbd5cb1f6f562a8e33594 +Author: Anton Babenko +Date: Fri Aug 28 09:03:59 2020 +0200 + + Updated CHANGELOG + +commit 6c77a6cdc9ff00af50ca7b435ca8ecfa0f7bee1d +Author: Robin Bowes +Date: Fri Aug 28 08:03:38 2020 +0100 + + fix: Squash terraform_docs bug (#138) + +commit 861c1166f9a1cf1a9ace8e81c38ffed1902e20d9 +Author: Anton Babenko +Date: Thu Aug 27 21:56:48 2020 +0200 + + Updated CHANGELOG + +commit 1d8af371d43e8ee48ac4b4074244436faa13cb86 +Author: Robin Bowes +Date: Thu Aug 27 20:55:28 2020 +0100 + + chore: Use lib_getopt for all hooks and some style tweaks (#137) + +commit 0c5cbb380bef5c7625c9479de2a08bfc98c3009b +Author: Anton Babenko +Date: Thu Aug 27 11:58:35 2020 +0200 + + Updated CHANGELOG + +commit 774c63e772f1d933a066ae59ca74e7137f1d982a +Author: Robin Bowes +Date: Thu Aug 27 10:57:45 2020 +0100 + + fix: Pass args and env vars to terraform validate (#125) + +commit 994653c507cd67a160b066e1552e6f6b5df25ec0 +Author: Khosrow Moossavi +Date: Wed Aug 19 06:06:55 2020 -0400 + + docs: Update terraform-docs link pointing to new organization (#130) + +commit dafe42560ace053a00e5902931972ba9f28b7d5c +Author: Anton Babenko +Date: Wed Aug 19 12:02:43 2020 +0200 + + Updated CHANGELOG + +commit f6caf2195ac53fd31990a526e20f7a05ca37466d +Author: Prahalad Ramji +Date: Wed Aug 19 20:01:42 2020 +1000 + + feat: add terragrunt validate hook (#134) + +commit 2e40ade8d0bdff4eea5fb64e55d6f40a71768426 +Author: Anton Babenko +Date: Wed May 27 10:36:23 2020 +0200 + + Updated CHANGELOG + +commit 27e63693395ce9965d52e6e23844cc792a145983 +Author: Anton Babenko +Date: Wed May 27 10:35:15 2020 +0200 + + fix: Updated formatting in README (closes #113) + +commit 85ec8a49bec3ea8e3b749f2650b92b6da64fdeb0 +Author: snolan-uturn <50503078+snolan-uturn@users.noreply.github.com> +Date: Wed Apr 29 15:06:02 2020 -0500 + + docs: Fixed the docs to use the latest config syntax(#106) + +commit d174ca951460cf5328720b193879d0b6cdf705db +Author: gchappell99 <44392051+gchappell99@users.noreply.github.com> +Date: Wed Apr 29 10:35:31 2020 +0100 + + docs: Added coreutils as requirements in README.md (#105) + +commit 750e16dec0b3fae63469c9839b9d187472039a3d +Author: Anton Babenko +Date: Thu Apr 23 17:00:31 2020 +0200 + + Updated CHANGELOG + +commit 5bd4e2e14b0fd4584150e82cd5313e8f4e387c4f +Author: Anton Babenko +Date: Thu Apr 23 16:58:40 2020 +0200 + + Updated pre-commit deps + +commit 2be8fe54537c12e98188963266bb5fabc79b527b +Author: Jon Proietti <45764555+jon-proietti-nutrien@users.noreply.github.com> +Date: Thu Apr 23 09:56:33 2020 -0500 + + feat: Support for TFSec (#103) + +commit 29fa14037b7e56e7fe91decbe2d5a528fda9ad37 +Author: Anton Babenko +Date: Sat Apr 4 08:25:11 2020 +0200 + + Updated CHANGELOG + +commit 7694fb9b9a2187670f55233d0317c05f6b0080d5 +Author: Nick M <50747025+mcdonnnj@users.noreply.github.com> +Date: Sat Apr 4 02:17:25 2020 -0400 + + fix: Change terraform_validate hook functionality for subdirectories with terraform files (#100) + + * Update terraform_validate.sh: + -Change to the directory before running terraform validate to use the Terraform + configuration for the appropriate working directory. + + * Neglected to change the terraform validate call to use the default of the + current directory. + + * Several changes to improve functionality: + - Switch to checking the path for '*.tf' instead of always checking the current + directory. + - Try to find a '.terraform' directory (which indicates a `terraform init`) and + change to that directory before running `terraform validate`. + + * Fix the description for the terraform_validate hook to reflect changes that were + made in: + https://github.com/antonbabenko/pre-commit-terraform/commit/35e0356188b64a4c5af9a4e7200d936e514cba71 + + * - Clean up comments. + - Adjust variable names to better reflect what they are holding. + +commit 8cbcd8ea2b3aff6e2c64daefd681b9c07bbd36b8 +Author: Anton Babenko +Date: Sat Apr 4 07:55:09 2020 +0200 + + Updated CHANGELOG + +commit b0d4a68b892f9543cada942767ed95cb88adeef9 +Author: Sergei Ivanov +Date: Sat Apr 4 06:55:01 2020 +0100 + + Allow passing multiple args to terraform-docs (#98) + +commit 800756d8950ce3dfccd76adc71afb86119bf8690 +Author: Maksym Vlasov +Date: Wed Mar 18 16:33:35 2020 +0200 + + Update installation instructions (#79) + + - Fix package name misspell + - TFlint migrate to another organization + +commit 0a75b5bafe3068ecc7d1f64c71dbc1ecfcc98019 +Author: Anton Babenko +Date: Mon Mar 2 15:49:27 2020 +0100 + + Updated CHANGELOG + +commit e402c03b6a7275cf3320d732ae792a0c4b61cda9 +Author: Martin Coxall +Date: Mon Mar 2 14:48:53 2020 +0000 + + corrected tflint documentation (#95) + +commit e321ff1b9cdf2ed8dcb6ceb7a26a5accc40abb3a +Author: Anton Babenko +Date: Fri Feb 21 13:48:05 2020 +0100 + + Updated CHANGELOG + +commit 59e48e4f04e8bdb93e27edc2fe08f8c96c632735 +Author: Anton Babenko +Date: Fri Feb 21 13:47:52 2020 +0100 + + Updated pre-commit-hooks + +commit 2ebb28ad16f35bac03021a0eb229d40cbdc6a2cb +Author: Anton Babenko +Date: Fri Feb 21 13:47:04 2020 +0100 + + Fixed exit code for terraform 0.11 branch in terraform_docs (#94) + +commit 7f7ce9eebba4b265121718cb1c5b619e40f168b0 +Author: Anton Babenko +Date: Thu Jan 30 11:18:50 2020 +0100 + + Updated CHANGELOG + +commit e990429660acabe17a55f6b64d91ea3b4f331abd +Author: Robson Roberto Souza Peixoto <124390+robsonpeixoto@users.noreply.github.com> +Date: Thu Jan 30 07:18:01 2020 -0300 + + Fixed tflint hook to iterate over files (#77) + +commit 47346044cb78f63a6c2e6de339fc2caa34960ca2 +Author: Anton Babenko +Date: Tue Jan 21 11:54:31 2020 +0100 + + Updated CHANGELOG + +commit 1e5b3af0d2234f8b5ff6d1da091ccfe87deacf30 +Author: Anton Babenko +Date: Tue Jan 21 11:54:13 2020 +0100 + + Added shfmt to autoformat shell scripts (#86) + +commit 07730a425a6798be7d92460dc204fd1f2015ef10 +Author: Anton Babenko +Date: Tue Jan 21 11:20:16 2020 +0100 + + Updated CHANGELOG + +commit b99e3500e18c3ae145ec519fdba54808318cfbec +Author: Konstantin Kirpichnikov <56006844+konstantin-recurly@users.noreply.github.com> +Date: Tue Jan 21 05:19:46 2020 -0500 + + Added support for terraform-docs 0.8.0 with proper support for Terraform 0.12 syntax (bye-bye awk) (#85) + +commit 9fd71e3934b369e477d4f66543679bdaa1c0d7eb +Author: Anton Babenko +Date: Mon Jan 13 11:41:09 2020 +0100 + + Updated CHANGELOG + +commit 76969eab80997f4dc0d4eb0cce7f5d497a5826ff +Author: Thierno IB. BARRY +Date: Mon Jan 13 11:40:35 2020 +0100 + + move terraform-docs args after markdown command (#83) + +commit 26ab873aa6fdbb50779e054b85e504386d662224 +Author: Anton Babenko +Date: Sat Nov 16 19:37:56 2019 +0100 + + Updated CHANGELOG + +commit 8bddc8b81cc2739b2af2f6932204108ee02f6327 +Author: chopped pork +Date: Sat Nov 16 18:37:23 2019 +0000 + + use getopt for args in the tflint hook, following the approach in terraform-docs (#75) + +commit cbf245833b4194520b04c0aa649973ea0df5cd71 +Author: Anton Babenko +Date: Sat Nov 2 12:16:31 2019 +0100 + + Updated CHANGELOG + +commit 6ffc42a4b5c1f194b9feacfa33e308ea7ea569b4 +Author: cytopia +Date: Sat Nov 2 12:15:33 2019 +0100 + + Fixes #65: terraform-docs should not fail if complex types contain 'description' keyword (#73) + +commit 657ce4ecf019b6964813a590fd0c3ed35e234a43 +Author: Anton Babenko +Date: Fri Nov 1 10:08:49 2019 +0100 + + Added FUNDING.yml + +commit eec9c884a1fed9ef87aa71ac14031898c14323f4 +Author: Maksym Vlasov +Date: Thu Oct 17 14:50:16 2019 +0300 + + Improve installation instructions and make README more readable (#72) + +commit a7b730a20b7ecb0f86a513430e6692f9ba1c387d +Author: Dave Gallant +Date: Sat Oct 12 05:39:06 2019 -0400 + + Update rev in README.md (#70) + + Updating the version in the README. + + In order for `terraform_tflint`, the rev must be at least `v1.19.0`. + +commit c823172b8436519494f4b466b0eac3929697b4ed +Author: Anton Babenko +Date: Tue Aug 20 21:34:52 2019 +0200 + + Updated CHANGELOG + +commit d5640fd4dc0e07ab4276409c1e8d2e8f9f1f1ddc +Author: Anton Babenko +Date: Tue Aug 20 21:34:42 2019 +0200 + + Updated README with terraform_tflint hook + +commit e0d3d614225017064ad47921ced90f04f7e15bd5 +Author: Costin GALAN +Date: Tue Aug 20 22:31:28 2019 +0300 + + Added support for TFLint with --deep parameter (#53) + + Added support for TFLint (https://github.com/wata727/tflint). + + Signed-off-by: Costin Galan + +commit dc8cf4844190ce81f214485917639d7cf7c308b9 +Author: Anton Babenko +Date: Tue Aug 20 21:17:41 2019 +0200 + + Updated CHANGELOG + +commit 7eb805fb0e1f2acb5dbfe8b04ff72fb3b31f5a2c +Author: Anton Babenko +Date: Tue Aug 20 21:16:30 2019 +0200 + + Updated README with terragrunt_fmt hook + +commit d8dfc2c0345a8a846ca7841e4bd58b7deab91810 +Author: Scott Crooks +Date: Tue Aug 20 20:38:40 2019 +0200 + + Formatter for Terragrunt HCL files (#60) + + * Formatter for Terragrunt HCL files + + * Adding Terragrunt documentation + +commit 4bebeac734da116cc5fe535643252724321521a7 +Author: Anton Babenko +Date: Tue Jun 25 14:35:00 2019 +0200 + + Updated CHANGELOG + +commit 83629157c22800f59ab59642f82abef3df31721a +Author: Anton Babenko +Date: Tue Jun 25 14:34:46 2019 +0200 + + Fixed enquoted types in terraform_docs (fixed #52) + +commit 3147a7c0ee5d06d783346a968aa2c0c4e104608b +Author: Eric Gonzales +Date: Wed Jun 19 06:10:21 2019 -0400 + + Fix typo in README (#51) + +commit 5d8d926848047866342fd9e211f3f81c5157cdfd +Author: Anton Babenko +Date: Tue Jun 18 21:18:18 2019 +0200 + + Updated CHANGELOG + +commit c9ecd72f5f5014b983ca2e87c431cbb8b2cc7eed +Author: Anton Babenko +Date: Tue Jun 18 21:17:57 2019 +0200 + + Add slash to mktemp dir (fixed #50) + +commit 59ffa65527d7628b0f87b665c167643515940a2f +Author: Anton Babenko +Date: Tue Jun 18 14:00:29 2019 +0200 + + Updated CHANGELOG + +commit 10854fcfa2202bd677446b2d298a0ea6119941fb +Author: Anton Babenko +Date: Tue Jun 18 13:58:49 2019 +0200 + + Fixed awk script for terraform-docs (kudos @cytopia) and mktemp on Mac (closes #47, #48, #49) + +commit d678da98103da31aee9c05b07b6ca9f68191e061 +Author: Leonhardt Wille +Date: Mon Jun 17 14:01:24 2019 +0200 + + Fix version in README.md (#46) + +commit 060249f2fe4df62f413ae412eff40820560e21de +Author: Anton Babenko +Date: Mon Jun 17 13:12:16 2019 +0200 + + Updated CHANGELOG + +commit 35e0356188b64a4c5af9a4e7200d936e514cba71 +Author: Paweł Szczepaniak +Date: Mon Jun 17 13:09:31 2019 +0200 + + Upgraded to work with Terraform >= 0.12 (#44) + +commit 9300d0f1942bf03f6a41225a445368014b2f5f62 +Author: Anton Babenko +Date: Mon Jun 17 12:47:58 2019 +0200 + + Updated CHANGELOG + +commit 8cddce38b0953e48c32909ba75408f50c6075e07 +Author: Anton Babenko +Date: Mon Jun 17 12:47:06 2019 +0200 + + Added support for terraform_docs for Terraform 0.12 (#45) + +commit dbf91086f31cef3fdf3652d62eae57ffce943568 +Author: Anton Babenko +Date: Mon May 27 09:34:00 2019 -0700 + + Updated CHANGELOG + +commit 5725b11b558a03eb787623d53a0c7c157cb75f3b +Author: Anton Babenko +Date: Mon May 27 09:33:32 2019 -0700 + + Added note about incompatibility of terraform-docs with Terraform 0.12 (#41) + +commit 418a5ec782f8ed37d804a539ef1b2d3c14bee8bf +Author: Anton Babenko +Date: Sat Apr 6 21:19:39 2019 +0200 + + Fixed broken "maintained badge" + +commit 249c02bb64e9f8a9b08a11c723fd78590cdccea2 +Author: Guido Dobboletta +Date: Tue Mar 5 02:16:55 2019 -0600 + + Update README.md (#36) + +commit 7eb9ca3f2f70302227d1315a66a5a868562c02b7 +Author: Anton Babenko +Date: Fri Mar 1 09:49:34 2019 +0100 + + Updated changelog + +commit a3771b5119231be9677934b88ee47203e9cb5a90 +Author: Tyler Christiansen +Date: Fri Mar 1 00:48:50 2019 -0800 + + fix check for errors at the end (#35) + +commit 2c842d94615268be20391c248b91b070e60c5912 +Author: Anton Babenko +Date: Thu Feb 21 09:43:31 2019 +0100 + + Bump new version + +commit beb4a677531027e2991cade71b9567995939845a +Author: Josiah Halme +Date: Thu Feb 21 19:38:50 2019 +1100 + + Add exit code for 'terraform validate' so pre-commit check fails (#34) + +commit 66214dcc4b092a81e0146b2e66745627386b90ee +Author: Anton Babenko +Date: Mon Feb 18 18:52:46 2019 +0100 + + Added CHANGELOG.md + +commit bc0e68bfd3ec0c777fcb511baf94af323d40c620 +Author: Anton Babenko +Date: Mon Feb 18 18:52:10 2019 +0100 + + Added chglog (hi @robinbowes :)) + +commit 175000320bdf39667fde509ffceafe644198ea07 +Merge: 3cdf8ec 57d924d +Author: Anton Babenko +Date: Mon Feb 18 18:38:45 2019 +0100 + + Merge pull request #33 from chrisgilmerproj/run_terraform_docs_in_serial + + Require terraform-docs runs in serial + +commit 57d924d5d4621d6e2635c8daea931b657f66f050 +Author: Chris Gilmer +Date: Fri Feb 8 15:24:06 2019 -0800 + + Require terraform-docs runs in serial to avoid pre-commit doing parallel operations on similar file paths + +commit 3cdf8ecd62915ccf3c70aa84c8fa755cb952f11f +Merge: a52b507 15c9f39 +Author: Anton Babenko +Date: Sat Dec 15 09:40:31 2018 +0100 + + Merge pull request #30 from RothAndrew/feature/fix_issue_29 + + Fix bug not letting terraform_docs_replace work in the root directory… + +commit 15c9f394d32708ad3d2735af9c73cb03a6bad1af +Author: rothandrew +Date: Fri Dec 14 17:03:14 2018 -0500 + + Fix bug not letting terraform_docs_replace work in the root directory of a repo + +commit a52b507a1835facfca102b02389fbe957338b009 +Merge: 7acd99e fe3ba02 +Author: Anton Babenko +Date: Fri Dec 14 22:24:41 2018 +0100 + + Merge pull request #27 from RothAndrew/feature/new_hook + + Add new hook for running terraform-docs which will replace content of README.md (using Python) + +commit fe3ba02d25e3c7baa7f0fd3f97aaf3f2c3db62c6 +Author: rothandrew +Date: Fri Dec 14 16:19:54 2018 -0500 + + fix typo + +commit d3fe87daeac07704ae27e02e87df719dd7c9ac9f +Author: rothandrew +Date: Fri Dec 14 16:16:42 2018 -0500 + + Address requested changes + +commit cbd26b20c7dcae9b15ccecc7bf76a5e1c0ffdc81 +Author: rothandrew +Date: Fri Dec 14 10:45:59 2018 -0500 + + Add `--dest` argument + +commit debe93a82be27d9dab99858372a33cdde196a320 +Author: rothandrew +Date: Fri Dec 14 09:23:54 2018 -0500 + + Address requested changes + +commit 9aa971c069da7ef66f0a30075e6b68f21f243059 +Author: rothandrew +Date: Thu Dec 13 22:16:01 2018 -0500 + + Add new hook for running terraform-docs with replacing README.md from doc in main.tf + +commit 7acd99eeb74fc0db102058d8ef53863b8a14c47a +Merge: e2760ca 2b71d4b +Author: Anton Babenko +Date: Tue Dec 11 20:22:07 2018 +0100 + + Merge remote-tracking branch 'origin/master' into pr25 + +commit e2760caf8d70875ca85d25b11a972e1f207217f8 +Author: Anton Babenko +Date: Tue Dec 11 20:21:49 2018 +0100 + + Added followup after #25 + +commit 2b71d4b3bbcd6191bec1da0239539f5f9197f064 +Merge: b7c5094 fbdd40a +Author: Anton Babenko +Date: Tue Dec 11 20:21:40 2018 +0100 + + Merge pull request #25 from getcloudnative/feat-pass-terraform-docs-opts + + Add feature to pass options to terraform-docs. + +commit fbdd40ac8f8ebbcaecc1f90e762de753b1aab79c +Author: Martin Etmajer +Date: Tue Nov 13 12:30:06 2018 +0100 + + Add feature to pass options to terraform-docs. + +commit b7c50947b0f3968172a9c5a4df2ad3bb203dca22 +Author: Anton Babenko +Date: Tue Jul 10 11:28:43 2018 +0200 + + Added license file (fixed #21) + +commit 8dd603be09855246e7622681e609c1e4dc5513d3 +Author: Anton Babenko +Date: Thu May 24 22:12:04 2018 +0200 + + Updated README + +commit 69039c3a8cadd12435040a2161fde0453de7b69a +Author: Robin Bowes +Date: Thu May 24 21:10:49 2018 +0100 + + Only run validate if .tf files exist in the directory. (#20) + + * Only run validate if .tf files exist in the directory. + + * Same fix, different script :) + +commit 2d3782cefadb0941102fe413ab08a75905fcd081 +Author: jeremy avnet <162998+brainsik@users.noreply.github.com> +Date: Sun May 20 03:10:28 2018 -0700 + + Replace terraform_docs use of GNU sed with perl (#15) + + * Fix ShellCheck warning 2219 + + https://github.com/koalaman/shellcheck/wiki/SC2219 + + * Replace GNU sed commands with perl + + This replaces the sed commands which required GNU sed be installed with + perl versions. This should make this script more universally usable + (e.g., on macOS) without installing additional tools. + +commit 6b06683c0db2bcee7d9230f107855223c199bea8 +Author: jeremy avnet <162998+brainsik@users.noreply.github.com> +Date: Sun May 20 01:00:34 2018 -0700 + + Fixes use of md5 for tempfile name (#16) + +commit 091f8b15d7b458e5a0aca642483deb2205e7db02 +Author: Anton Babenko +Date: Wed May 16 21:58:40 2018 +0200 + + Run terraform_docs only if README.md is present + +commit 8e03aec3d5362eb511043c4be0bbc671de5c1ad1 +Author: Anton Babenko +Date: Wed May 16 21:57:49 2018 +0200 + + Run terraform_docs only if README.md is present + +commit 97a668640d21b76e5afa727bb5af005fe9501bcb +Author: Anton Babenko +Date: Wed May 16 20:04:48 2018 +0200 + + Added terraform-docs integration (#13) + + * Add hook to create readme + + * Updated README + +commit 41d4951aff03f70ac72908e78a7439ff0cb8ee71 +Author: Anton Babenko +Date: Sat Apr 21 11:22:47 2018 +0200 + + Allow to have spaces in directories (#11) + +commit e6267fd1508002ce35c91b76f2b13ce317a4e03d +Author: Anton Babenko +Date: Tue Mar 6 13:59:22 2018 +0100 + + Bump new version + +commit b0d43204ca5dd994dd0b9f2a4c793ff807cfc303 +Author: Anton Babenko +Date: Tue Mar 6 13:58:03 2018 +0100 + + Format tfvars files explicitely, because terraform fmt ignores them (#9) + +commit c6f81e3730aa1515cfbc4f5ab7aa2369afb186f0 +Author: Anton Babenko +Date: Wed Jan 24 15:46:37 2018 +0100 + + Updated readme + +commit b9a885160a1c7610a2ff7e40c408d24a1bb8f50f +Author: Anton Babenko +Date: Wed Jan 24 14:03:15 2018 +0100 + + Show failed path + +commit 93394c482adb12659113b1c09b856ec631db8bdb +Author: Anton Babenko +Date: Wed Jan 24 13:57:41 2018 +0100 + + Show failed path + +commit 97769abeb3fcf9191bee8b0bc43024d7a99edbff +Author: Anton Babenko +Date: Wed Jan 24 13:48:44 2018 +0100 + + Show failed path + +commit e220e169cab46dd7e2cdb6b258b311c69036a8e8 +Author: Anton Babenko +Date: Wed Jan 24 13:34:34 2018 +0100 + + Updated scripts + +commit 5f3ac96d4441b230c04e14161fdeb350dba7ad9c +Author: Anton Babenko +Date: Wed Jan 24 12:13:51 2018 +0100 + + Added scripts to validate terraform files + +commit 70b77dcf32a7096b03227edd375f01e6177d4f81 +Author: Anton Babenko +Date: Mon Jan 15 16:27:01 2018 +0100 + + Added badges + +commit bd50003bd773511e596c67984c144cc5774dac4c +Author: Anton Babenko +Date: Mon Jan 15 16:12:51 2018 +0100 + + Added formatting for tfvars (fixes #4) (#6) + +commit 37dfe9ab4bf3d8d5889246817f4233bdcea0efcf +Merge: 42cd6c4 4c7ea04 +Author: Anton Babenko +Date: Thu Jan 4 13:12:07 2018 +0100 + + Merge pull request #5 from schneems/schneems/codetriage-badge + + [ci skip] Get more Open Source Helpers + +commit 4c7ea0417dd2ffcf97264a1c76362c4791dabe6c +Author: schneems +Date: Wed Jan 3 22:26:39 2018 -0600 + + [ci skip] Get more Open Source Helpers + + [CodeTriage](https://www.codetriage.com/) is an app I have maintained + for the past 4-5 years with the goal of getting people involved in + Open Source projects like this one. The app sends subscribers a random + open issue for them to help "triage". For some languages you can also + suggested areas to add documentation. + + The initial approach was inspired by seeing the work of the small + core team spending countless hours asking "what version was + this in" and "can you give us an example app". The idea is to + outsource these small interactions to a huge team of volunteers + and let the core team focus on their work. + + I want to add a badge to the README of this project. The idea is to + provide an easy link for people to get started contributing to this + project. A badge indicates the number of people currently subscribed + to help the repo. The color is based off of open issues in the project. + + Here are some examples of other projects that have a badge in their + README: + + - https://github.com/crystal-lang/crystal + - https://github.com/rails/rails + - https://github.com/codetriage/codetriage + + Thanks for building open source software, I would love to help you find some helpers. + +commit 42cd6c44f6867d354648915a541080c625a6c311 +Author: Anton Babenko +Date: Thu Jun 8 11:02:21 2017 +0200 + + Renamed shell script file to the correct one + +commit 837203f7b80a7ab0069cbaee80850a85325bdf02 +Author: Anton Babenko +Date: Thu Jun 8 10:31:58 2017 +0200 + + Updated .pre-commit-hooks.yaml + +commit 2a81bb52c804a0694ee7529fc7d577b46eb9ddec +Author: Anton Babenko +Date: Thu Jun 8 10:30:39 2017 +0200 + + Updated sha in README + +commit ebced21e6deee9f8f2cbd2a20ed22bfb26d71d02 +Merge: b50c154 f99b7dd +Author: Anton Babenko +Date: Thu Jun 8 10:28:52 2017 +0200 + + Merge pull request #3 from pecigonzalo/master + + Exclude .terraform even on subfolders + +commit f99b7dd61c68322f1a7299b408532013afdccecf +Author: Gonzalo Peci +Date: Wed Mar 29 17:08:02 2017 +0200 + + Exclude .terraform even on subfolders + +commit b50c154638d10aef306b3c5538b1813bb3c70064 +Author: Anton Babenko +Date: Wed Jan 25 10:28:51 2017 +0100 + + Copied to .pre-commit-hooks.yaml for compatibility (closes #1) + +commit 67dcb8615ff462786c211117b7dd52fd43493e75 +Author: Anton Babenko +Date: Tue Sep 27 21:47:08 2016 +0200 + + Updated README + +commit 587d4420a575e3d256ba3d36f641e1c462ff79a1 +Author: Anton Babenko +Date: Tue Sep 27 20:01:11 2016 +0200 + + Ready, probably :) + +commit 8c2226857e61d789f01a02fb96feaaadb7c20d6b +Author: Anton Babenko +Date: Tue Sep 27 19:47:26 2016 +0200 + + Initial commit + +commit f454b08495c58b96dfd5fddf5ac470660f4061e1 +Author: Anton Babenko +Date: Tue Sep 27 19:37:42 2016 +0200 + + Initial commit diff --git a/hooks/_common.sh b/hooks/_common.sh index 7fc62d6cd..d81bc80c4 100644 --- a/hooks/_common.sh +++ b/hooks/_common.sh @@ -293,22 +293,22 @@ function common::terraform_init { local exit_code=0 local init_output -echo "terraform_init" + # Suppress terraform init color if [ "$PRE_COMMIT_COLOR" = "never" ]; then TF_INIT_ARGS+=("-no-color") fi -echo "terraform_init2" - if [ ! -d .terraform ]; then + + if [ ! -d .terraform/modules ] || [ ! -d .terraform/providers ]; then init_output=$(terraform init -backend=false "${TF_INIT_ARGS[@]}" 2>&1) exit_code=$? -echo "terraform_init3" + if [ $exit_code -ne 0 ]; then common::colorify "red" "'terraform init' failed, '$command_name' skipped: $dir_path" echo -e "$init_output\n\n" fi fi -echo "terraform_init4" + return $exit_code } From 89ecd5ad2f48cb74938c74481e094cf1b1c7c2ed Mon Sep 17 00:00:00 2001 From: MaxymVlasov Date: Thu, 24 Nov 2022 18:38:05 +0200 Subject: [PATCH 31/43] Show tf init --- hooks/_common.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hooks/_common.sh b/hooks/_common.sh index d81bc80c4..616297789 100644 --- a/hooks/_common.sh +++ b/hooks/_common.sh @@ -306,6 +306,8 @@ function common::terraform_init { if [ $exit_code -ne 0 ]; then common::colorify "red" "'terraform init' failed, '$command_name' skipped: $dir_path" echo -e "$init_output\n\n" + else + common::colorify "red" "'terraform init' succeed, '$command_name': $dir_path" fi fi From ae6d2581b65a83c4a1a93fdd7e7c0fd8fcd20f42 Mon Sep 17 00:00:00 2001 From: MaxymVlasov Date: Thu, 24 Nov 2022 18:40:09 +0200 Subject: [PATCH 32/43] Remove debug and fixup --- hooks/_common.sh | 2 +- hooks/terraform_validate.sh | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/hooks/_common.sh b/hooks/_common.sh index 616297789..af468ab76 100644 --- a/hooks/_common.sh +++ b/hooks/_common.sh @@ -307,7 +307,7 @@ function common::terraform_init { common::colorify "red" "'terraform init' failed, '$command_name' skipped: $dir_path" echo -e "$init_output\n\n" else - common::colorify "red" "'terraform init' succeed, '$command_name': $dir_path" + common::colorify "green" "Command 'terraform init' successfully done" fi fi diff --git a/hooks/terraform_validate.sh b/hooks/terraform_validate.sh index 05af36511..9c9ef13ae 100755 --- a/hooks/terraform_validate.sh +++ b/hooks/terraform_validate.sh @@ -119,15 +119,10 @@ function per_dir_hook_unique_part { # `.terraform` dir completely. rm -rf .terraform/{modules,providers}/ -echo before reinit $(ls .terraform) -ls .terraform -pwd common::terraform_init 'terraform validate' "$dir_path" || { exit_code=$? return $exit_code } -echo after reinit -ls .terraform common::colorify "yellow" "Re-validating: $dir_path" fi From 4231f76ad5296396c7e9439605b91fdda50b71d9 Mon Sep 17 00:00:00 2001 From: MaxymVlasov Date: Thu, 24 Nov 2022 18:41:56 +0200 Subject: [PATCH 33/43] debug --- hooks/_common.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hooks/_common.sh b/hooks/_common.sh index af468ab76..1ac2afdd9 100644 --- a/hooks/_common.sh +++ b/hooks/_common.sh @@ -307,7 +307,8 @@ function common::terraform_init { common::colorify "red" "'terraform init' failed, '$command_name' skipped: $dir_path" echo -e "$init_output\n\n" else - common::colorify "green" "Command 'terraform init' successfully done" + + common::colorify "green" "Command 'terraform init' successfully done: $(pwd)" fi fi From 15cafcddcce89ef85dfc123d55085cf2255df842 Mon Sep 17 00:00:00 2001 From: MaxymVlasov Date: Thu, 24 Nov 2022 18:44:53 +0200 Subject: [PATCH 34/43] Relative path? --- hooks/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hooks/_common.sh b/hooks/_common.sh index 1ac2afdd9..84787a072 100644 --- a/hooks/_common.sh +++ b/hooks/_common.sh @@ -308,7 +308,7 @@ function common::terraform_init { echo -e "$init_output\n\n" else - common::colorify "green" "Command 'terraform init' successfully done: $(pwd)" + common::colorify "green" "Command 'terraform init' successfully done: $dir_path" fi fi From 809e2ee64b49f65667f029bf1b6774bb5e6ca267 Mon Sep 17 00:00:00 2001 From: MaxymVlasov Date: Thu, 24 Nov 2022 18:46:44 +0200 Subject: [PATCH 35/43] remove useless --- h | 2296 ------------------------------------------------------------- 1 file changed, 2296 deletions(-) delete mode 100644 h diff --git a/h b/h deleted file mode 100644 index c84f4a309..000000000 --- a/h +++ /dev/null @@ -1,2296 +0,0 @@ -commit ac70245d60e077a6da851b47de25c83e746685ac (HEAD -> retry_once_with_cleanup, origin/retry_once_with_cleanup) -Author: MaxymVlasov -Date: Thu Nov 24 18:32:09 2022 +0200 - - debug - -commit 2bdf052b9dad0770b01e286b42249928fc985269 -Author: MaxymVlasov -Date: Thu Nov 24 18:24:52 2022 +0200 - - debug - -commit a13ecf9f2d610e643c4a7a5eb103028cf95a1a27 -Author: MaxymVlasov -Date: Thu Nov 24 18:21:34 2022 +0200 - - debug - -commit 3171311839cfdc1d07fb794e14114c815599fca9 -Author: MaxymVlasov -Date: Thu Nov 24 18:12:52 2022 +0200 - - Add tf re-init - -commit 39604c49b99a35db1a8aa970d527af3c07e7593f -Author: MaxymVlasov -Date: Thu Nov 24 18:11:20 2022 +0200 - - remove debug and useless - -commit b0800b293a1b77364cf3c712f3ad83370589e246 -Author: MaxymVlasov -Date: Thu Nov 24 18:09:15 2022 +0200 - - debug - -commit 0887cd8c1e2bed2f109d152015c1ef7eb78b8a4e -Author: MaxymVlasov -Date: Thu Nov 24 18:08:23 2022 +0200 - - drbug - -commit bd66aff9c14e03555ec65de171119150371a9e20 -Author: MaxymVlasov -Date: Thu Nov 24 18:06:49 2022 +0200 - - t - -commit c23cb25136596852e0ffb41c2bca2538af80a490 -Author: MaxymVlasov -Date: Thu Nov 24 18:05:45 2022 +0200 - - t - -commit 7a7a621673440f890eb212d5cdd2062a38f588c9 -Author: MaxymVlasov -Date: Thu Nov 24 18:04:39 2022 +0200 - - debug - -commit c2d5c425c5919a46a61b553b16142c7d5eed7a2d -Author: MaxymVlasov -Date: Thu Nov 24 18:02:19 2022 +0200 - - f - -commit 7574616c2a72869d55fb90ee9caf0bc485e0a835 -Author: MaxymVlasov -Date: Thu Nov 24 18:00:26 2022 +0200 - - f - -commit d4764475f873d43b0222f6bd51953d021d34d350 -Author: MaxymVlasov -Date: Thu Nov 24 17:57:02 2022 +0200 - - Simplify codebase - -commit c0d169d95476a5b2fd06bdf9dbdf19c67e1ce20f -Author: MaxymVlasov -Date: Thu Nov 24 17:42:05 2022 +0200 - - fixup - -commit b3e420b84a7bd76a3269540bef990cdc60ba9a1c -Author: MaxymVlasov -Date: Thu Nov 24 17:34:11 2022 +0200 - - Add tf init - -commit 8a60156a74ae851dca57bbf1adc8d4dfa8e8c2d7 -Author: MaxymVlasov -Date: Thu Nov 24 17:30:13 2022 +0200 - - fixup - -commit e83def1aa427555cfb362cbc0cdfd4b408635452 -Author: MaxymVlasov -Date: Thu Nov 24 17:21:57 2022 +0200 - - fixup - -commit 3d758f5a0439d92a315b082dacecc13f8b4a57d6 (test) -Author: MaxymVlasov -Date: Thu Nov 24 17:00:18 2022 +0200 - - fixup - -commit a65aaab5c2967c5ce58e7c80253648fa18def47f -Author: MaxymVlasov -Date: Thu Nov 24 16:57:11 2022 +0200 - - Fixup - -commit a756cc634ef46439428caf3327a02494bb5667f8 -Author: Maksym Vlasov -Date: Thu Nov 24 16:37:46 2022 +0200 - - Apply suggestions from code review - -commit 4699596819ef5a371f951aa4de2ea9b3e0cf1651 -Author: MaxymVlasov -Date: Thu Nov 24 16:36:08 2022 +0200 - - Improve readability, remove magic numbers - -commit 2e9485351f969874fbb979fa9cef97a048d65051 -Author: MaxymVlasov -Date: Thu Nov 24 16:27:04 2022 +0200 - - Deduplicate code - -commit d99140c6a5523e15ffcbcee60f9b5fe09836fec2 -Author: Bjorn Olsen -Date: Fri Nov 18 13:01:21 2022 +0200 - - Update 3 - -commit 0e556edbddc0940762870941d73815982059eaf7 -Author: MaxymVlasov -Date: Fri Nov 4 21:13:50 2022 +0200 - - Set constant warning-note style accross README - -commit de51a54bea63694af835ff3b8d96d90b41f18221 -Author: MaxymVlasov -Date: Fri Nov 4 20:55:34 2022 +0200 - - Clarify when jq needed. Without it - adding jq dep - is BREAKING CHANGE - -commit 1541f3b964f732a455b9255a0d0f9442cb78efd0 -Author: MaxymVlasov -Date: Fri Nov 4 20:51:46 2022 +0200 - - Fix README - -commit 6cf6f32a9f4a8b98c7e44d173c86f705b1c6df11 -Author: Bjorn Olsen -Date: Fri Nov 4 07:13:33 2022 +0200 - - Update 2 - -commit c1035428a279ca8ef63e5d028aa323a7816c8466 -Author: Bjorn Olsen -Date: Fri Oct 28 11:29:08 2022 +0200 - - Update 1 - -commit a7e3d90daeac7b74b7231a68078cec614c8aae3d -Author: Bjorn Olsen -Date: Fri Oct 21 09:39:42 2022 +0200 - - feat: Add --retry-once-with-cleanup to `terraform_validate` - -commit 07c6764c309d14fd37536e6c679354ab99c59a59 (origin/master, origin/HEAD, master) -Author: semantic-release-bot -Date: Thu Oct 6 16:16:58 2022 +0000 - - chore(release): version 1.76.0 [skip ci] - - # [1.76.0](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.75.0...v1.76.0) (2022-10-06) - - ### Features - - * Add support for version constraints in `tfupdate` ([#437](https://github.com/antonbabenko/pre-commit-terraform/issues/437)) ([a446642](https://github.com/antonbabenko/pre-commit-terraform/commit/a4466425fb486257cfc672094d92b0fb04fdfe93)) - -commit a4466425fb486257cfc672094d92b0fb04fdfe93 -Author: Maksym Vlasov -Date: Thu Oct 6 19:16:29 2022 +0300 - - feat: Add support for version constraints in `tfupdate` (#437) - -commit f5aa7c83b61c6a2838b1ee67f5c706623fe015cc -Author: semantic-release-bot -Date: Wed Sep 7 12:20:24 2022 +0000 - - chore(release): version 1.75.0 [skip ci] - - # [1.75.0](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.74.2...v1.75.0) (2022-09-07) - - ### Features - - * Allow running container as non-root UID/GID for ownership issues (docker) ([#433](https://github.com/antonbabenko/pre-commit-terraform/issues/433)) ([abc2570](https://github.com/antonbabenko/pre-commit-terraform/commit/abc2570e42d3b01b56d34a474eedbf13063d3c31)) - -commit abc2570e42d3b01b56d34a474eedbf13063d3c31 -Author: John Schutz <328434+tofupup@users.noreply.github.com> -Date: Wed Sep 7 07:19:52 2022 -0500 - - feat: Allow running container as non-root UID/GID for ownership issues (docker) (#433) - - Co-authored-by: George L. Yermulnik - Co-authored-by: MaxymVlasov - Co-authored-by: Anton Babenko - -commit 005134b4d3bd8f51323969e49cc1b6eca4352240 -Author: semantic-release-bot -Date: Fri Sep 2 07:51:39 2022 +0000 - - chore(release): version 1.74.2 [skip ci] - - ## [1.74.2](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.74.1...v1.74.2) (2022-09-02) - - ### Bug Fixes - - * Fixed url for wrappers in generated README (terraform_wrapper_module_for_each) ([#429](https://github.com/antonbabenko/pre-commit-terraform/issues/429)) ([fe29c6c](https://github.com/antonbabenko/pre-commit-terraform/commit/fe29c6c71abf31e5e7fbba6ed1d3555971e89ee4)) - -commit fe29c6c71abf31e5e7fbba6ed1d3555971e89ee4 -Author: Anton Babenko -Date: Fri Sep 2 09:51:03 2022 +0200 - - fix: Fixed url for wrappers in generated README (terraform_wrapper_module_for_each) (#429) - -commit 7317961a9fa421ec73c0f7d75374c042bd245ea5 -Author: LiranV -Date: Thu Sep 1 09:59:39 2022 +0300 - - docs: Fix README tflint example (#428) - -commit deb84bbb86160281c32164cdd002c3b9c71ec2bc -Author: Maksym Vlasov -Date: Thu Aug 4 16:18:30 2022 +0300 - - chore: Add new deps to check to issue template (#424) - -commit c767653cf4f9be210d91048b307898a52a69fe18 -Author: Maksym Vlasov -Date: Tue Aug 2 21:46:23 2022 +0300 - - chore: Fix `terraform_validate` exclude example (#422) - -commit be52a7205629205f5660e905a0d6b93029223084 -Author: Gyeongjun Paik -Date: Tue Jul 26 20:29:00 2022 +0900 - - Update README.md - - fix yaml syntax - -commit fd3428655ec83e52f0a4e8480d02d9164ff0846c -Author: Maksym Vlasov -Date: Thu Jul 14 16:14:14 2022 +0300 - - chore: Fix maintenance badge - -commit a78104c3601aa9ec4fa02d1638038dad3e0e8f99 -Author: semantic-release-bot -Date: Wed Jul 13 15:24:08 2022 +0000 - - chore(release): version 1.74.1 [skip ci] - - ## [1.74.1](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.74.0...v1.74.1) (2022-07-13) - - ### Bug Fixes - - * Passed scenario in `terraform_docs` hook now works as expected ([7ac2736](https://github.com/antonbabenko/pre-commit-terraform/commit/7ac2736ab9544455b06fb66f2fb40d3609a010b6)) - -commit 7ac2736ab9544455b06fb66f2fb40d3609a010b6 -Author: MaxymVlasov -Date: Wed Jul 13 16:41:50 2022 +0300 - - fix: Passed scenario in `terraform_docs` hook now works as expected - -commit b425e23e23c509a6c92ee4ba248739af9a70b253 -Author: Maksym Vlasov -Date: Wed Jul 13 15:19:04 2022 +0300 - - chore: Add bash version to required info in bug repports - -commit 331e7519737c8ec1df60a8a13ebdfa678b99ddc5 -Author: semantic-release-bot -Date: Tue Jul 12 18:38:35 2022 +0000 - - chore(release): version 1.74.0 [skip ci] - - # [1.74.0](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.73.0...v1.74.0) (2022-07-12) - - ### Bug Fixes - - * Add `--env-vars`, deprecate `--envs` ([#410](https://github.com/antonbabenko/pre-commit-terraform/issues/410)) ([2b35cad](https://github.com/antonbabenko/pre-commit-terraform/commit/2b35cad50fd7fe1c662cab1bfaab2a4ef7baa3c9)) - * Add `--tf-init-args`, deprecate `--init-args` ([#407](https://github.com/antonbabenko/pre-commit-terraform/issues/407)) ([c4f8251](https://github.com/antonbabenko/pre-commit-terraform/commit/c4f8251d302260953c62a6b2116ea89584ce04a6)) - - ### Features - - * Add support for set env vars inside hook runtime ([#408](https://github.com/antonbabenko/pre-commit-terraform/issues/408)) ([d490231](https://github.com/antonbabenko/pre-commit-terraform/commit/d4902313ce11cc12c738397463f307b830a9ba3e)) - * Allow `terraform_providers_lock` specify terraform init args ([#406](https://github.com/antonbabenko/pre-commit-terraform/issues/406)) ([32b232f](https://github.com/antonbabenko/pre-commit-terraform/commit/32b232f039ceee24b2db8e09de57047c78c6005b)) - * Suppress color for all hooks if `PRE_COMMIT_COLOR=never` set ([#409](https://github.com/antonbabenko/pre-commit-terraform/issues/409)) ([b12f0c6](https://github.com/antonbabenko/pre-commit-terraform/commit/b12f0c662c4ebd104b27880fc380854590c0ca22)) - -commit 2b35cad50fd7fe1c662cab1bfaab2a4ef7baa3c9 -Author: Maksym Vlasov -Date: Wed Jul 6 15:41:28 2022 +0300 - - fix: Add `--env-vars`, deprecate `--envs` (#410) - -commit b12f0c662c4ebd104b27880fc380854590c0ca22 -Author: Maksym Vlasov -Date: Wed Jul 6 15:34:13 2022 +0300 - - feat: Suppress color for all hooks if `PRE_COMMIT_COLOR=never` set (#409) - -commit d4902313ce11cc12c738397463f307b830a9ba3e -Author: Maksym Vlasov -Date: Tue Jul 5 19:07:01 2022 +0300 - - feat: Add support for set env vars inside hook runtime (#408) - -commit c4f8251d302260953c62a6b2116ea89584ce04a6 -Author: Maksym Vlasov -Date: Tue Jul 5 15:49:10 2022 +0300 - - fix: Add `--tf-init-args`, deprecate `--init-args` (#407) - -commit 32b232f039ceee24b2db8e09de57047c78c6005b -Author: Maksym Vlasov -Date: Tue Jul 5 15:25:30 2022 +0300 - - feat: Allow `terraform_providers_lock` specify terraform init args (#406) - -commit 0f2512248536030781e8bab2eabded73189377c9 -Author: Maksym Vlasov -Date: Tue Jul 5 15:24:58 2022 +0300 - - chore: Implement DRY for HOOK_ID (#405) - -commit 2623b7b8be0a2ffff89e0b1e49425816d7107952 -Author: Maksym Vlasov -Date: Mon Jul 4 21:08:50 2022 +0300 - - chore: Rewrite `terraform_validate` to `common::per_dir_hook` (#404) - - * Refactor: Rewrite `terraform_validate` to `common::per_dir_hook` - * Add ability to specify `--hook-config` in future - -commit 57467c56d491420aa6c89f722b120ac7bea0289b -Author: semantic-release-bot -Date: Mon Jun 27 16:57:41 2022 +0000 - - chore(release): version 1.73.0 [skip ci] - - # [1.73.0](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.72.2...v1.73.0) (2022-06-27) - - ### Features - - * Add __GIT_WORKING_DIR__ to terraform_checkov ([#399](https://github.com/antonbabenko/pre-commit-terraform/issues/399)) ([ae88ed7](https://github.com/antonbabenko/pre-commit-terraform/commit/ae88ed73cfb63398270608d4e68f46bb4424f150)) - -commit ae88ed73cfb63398270608d4e68f46bb4424f150 -Author: Olivier Brisse -Date: Tue Jun 28 02:57:09 2022 +1000 - - feat: Add __GIT_WORKING_DIR__ to terraform_checkov (#399) - -commit 1be6f0218d8e31a5c33284a64c283b62cb9f602a -Author: semantic-release-bot -Date: Tue Jun 21 21:00:23 2022 +0000 - - chore(release): version 1.72.2 [skip ci] - - ## [1.72.2](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.72.1...v1.72.2) (2022-06-21) - - ### Bug Fixes - - * Pre-commit-terraform terraform_validate hook ([#401](https://github.com/antonbabenko/pre-commit-terraform/issues/401)) ([d9f482c](https://github.com/antonbabenko/pre-commit-terraform/commit/d9f482c0c6fa0bd464bbaa7444b4f853f1bc4fb9)) - -commit d9f482c0c6fa0bd464bbaa7444b4f853f1bc4fb9 -Author: Nicholas Henry -Date: Tue Jun 21 14:59:41 2022 -0600 - - fix: Pre-commit-terraform terraform_validate hook (#401) - -commit 598bf2c7edd92f559b25655b899c4c41fb4d735b -Author: Ali Khajeh-Hosseini -Date: Thu Jun 9 13:05:35 2022 -0700 - - docs: Fix Infracost links (#396) - -commit 09e9baa769c997f1373c5ec677d879e6b34f48c1 -Author: Maksym Vlasov -Date: Tue Jun 7 13:04:00 2022 +0300 - - chore: Add Windows-related instructions (#395) - -commit 4619ee245c65077a86d931c2f9d5663475720c74 -Author: Anton Babenko -Date: Fri May 27 11:00:37 2022 +0200 - - docs: Updated docs for infracost_breakdown to match Infracost 0.10 (#392) - -commit a7b90d085ceac7e3944ed3dcf54e4da702344c4f -Author: semantic-release-bot -Date: Wed May 25 13:38:30 2022 +0000 - - chore(release): version 1.72.1 [skip ci] - - ## [1.72.1](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.72.0...v1.72.1) (2022-05-25) - - ### Bug Fixes - - * Fixed `terraform_fmt` with `tfenv`, when `terraform` default version is not specified ([#389](https://github.com/antonbabenko/pre-commit-terraform/issues/389)) ([1b9476a](https://github.com/antonbabenko/pre-commit-terraform/commit/1b9476a2798f49c474cb59e812ddaf66b2cc6ca2)) - -commit 1b9476a2798f49c474cb59e812ddaf66b2cc6ca2 -Author: Maksym Vlasov -Date: Wed May 25 16:37:55 2022 +0300 - - fix: Fixed `terraform_fmt` with `tfenv`, when `terraform` default version is not specified (#389) - -commit 57dff323966237d21c44200ef191a5c9f9c3f56a -Author: semantic-release-bot -Date: Wed May 25 12:32:00 2022 +0000 - - chore(release): version 1.72.0 [skip ci] - - # [1.72.0](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.71.0...v1.72.0) (2022-05-25) - - ### Features - - * When a config file is given, do not specify formatter on cli (terraform_docs) ([#386](https://github.com/antonbabenko/pre-commit-terraform/issues/386)) ([962054b](https://github.com/antonbabenko/pre-commit-terraform/commit/962054b923e7a4fff5338fd3f5cb76f957797dd3)) - -commit 962054b923e7a4fff5338fd3f5cb76f957797dd3 -Author: Lawrence <34475808+acodeninja@users.noreply.github.com> -Date: Wed May 25 13:31:24 2022 +0100 - - feat: When a config file is given, do not specify formatter on cli (terraform_docs) (#386) - -commit 5e927033d4080bc2a536972818b88196429926c1 -Author: Maksym Vlasov -Date: Wed May 18 19:00:39 2022 +0300 - - chore: Fix README (#387) - -commit 51147f1712117fa4d2c902cf6c9066c4fc8cafab -Author: Maksym Vlasov -Date: Mon May 16 14:03:56 2022 +0300 - - chore: Updated repo for `terrascan` (#384) - -commit 0f9beffdb93cc6e6001576c4c85ccdf8ff38f9f0 -Author: David Price -Date: Wed May 11 17:07:10 2022 -0500 - - fix hcledit brew install command (#383) - -commit 80ec2dd04d5b8a8250e28a6a00e24136d3f48aeb -Author: Maksym Vlasov -Date: Wed May 11 19:31:47 2022 +0300 - - chore: Clarify `terraform-docs` config usage (#381) - -commit 74a2e54f236a84754449045e0cf5e12f66c68c4d -Author: semantic-release-bot -Date: Mon May 2 17:59:45 2022 +0000 - - chore(release): version 1.71.0 [skip ci] - - # [1.71.0](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.70.1...v1.71.0) (2022-05-02) - - ### Features - - * Added terraform_wrapper_module_for_each hook ([#376](https://github.com/antonbabenko/pre-commit-terraform/issues/376)) ([e4e9a73](https://github.com/antonbabenko/pre-commit-terraform/commit/e4e9a73d7eb8182bcad5ffca17876d1c0a4a8a49)) - -commit e4e9a73d7eb8182bcad5ffca17876d1c0a4a8a49 -Author: Anton Babenko -Date: Mon May 2 19:59:08 2022 +0200 - - feat: Added terraform_wrapper_module_for_each hook (#376) - -commit aededd0eca2411bb10598b2fd91b32ff251ccff7 -Author: semantic-release-bot -Date: Thu Apr 28 07:07:09 2022 +0000 - - chore(release): version 1.70.1 [skip ci] - - ## [1.70.1](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.70.0...v1.70.1) (2022-04-28) - - ### Bug Fixes - - * Fixed `tfupdate` to work in all cases, not only `pre-commit run --all` ([#375](https://github.com/antonbabenko/pre-commit-terraform/issues/375)) ([297cc75](https://github.com/antonbabenko/pre-commit-terraform/commit/297cc757879f25bed6d3adf3b6254cf0d37b17c2)) - -commit 297cc757879f25bed6d3adf3b6254cf0d37b17c2 -Author: Maksym Vlasov -Date: Thu Apr 28 10:06:32 2022 +0300 - - fix: Fixed `tfupdate` to work in all cases, not only `pre-commit run --all` (#375) - -commit 8668ade969c097cd0fecd6a598bac6e2891d052f -Author: semantic-release-bot -Date: Thu Apr 28 07:05:29 2022 +0000 - - chore(release): version 1.70.0 [skip ci] - - # [1.70.0](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.69.0...v1.70.0) (2022-04-28) - - ### Features - - * Add support for `pre-commit/pre-commit-hooks` in Docker image ([#374](https://github.com/antonbabenko/pre-commit-terraform/issues/374)) ([017da74](https://github.com/antonbabenko/pre-commit-terraform/commit/017da745d0817f94b44c3c773e4aa8d42a80aa09)) - -commit 017da745d0817f94b44c3c773e4aa8d42a80aa09 -Author: Jonathan Forget -Date: Thu Apr 28 09:04:53 2022 +0200 - - feat: Add support for `pre-commit/pre-commit-hooks` in Docker image (#374) - -commit b4d8fd9752605956ae40ab72c7572d97b41fc3c7 -Author: semantic-release-bot -Date: Tue Apr 26 10:34:28 2022 +0000 - - chore(release): version 1.69.0 [skip ci] - - # [1.69.0](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.68.1...v1.69.0) (2022-04-26) - - ### Features - - * Allow env vars expansion in `--args` section for all hooks ([#363](https://github.com/antonbabenko/pre-commit-terraform/issues/363)) ([caa01c3](https://github.com/antonbabenko/pre-commit-terraform/commit/caa01c30b33a5a829b75ee6a9e9e08a534a42216)) - -commit caa01c30b33a5a829b75ee6a9e9e08a534a42216 -Author: Maksym Vlasov -Date: Tue Apr 26 13:33:58 2022 +0300 - - feat: Allow env vars expansion in `--args` section for all hooks (#363) - -commit 95ca35646c9f1a997498f7dc7d4af9b48daffbeb -Author: semantic-release-bot -Date: Wed Apr 20 12:11:35 2022 +0000 - - chore(release): version 1.68.1 [skip ci] - - ## [1.68.1](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.68.0...v1.68.1) (2022-04-20) - - ### Bug Fixes - - * Fixed git fatal error in Dockerfile ([#372](https://github.com/antonbabenko/pre-commit-terraform/issues/372)) ([c3f8dd4](https://github.com/antonbabenko/pre-commit-terraform/commit/c3f8dd40e6d6867c661e2495f8194ee7bd9c7fdd)) - -commit c3f8dd40e6d6867c661e2495f8194ee7bd9c7fdd -Author: Maksym Vlasov -Date: Wed Apr 20 15:10:59 2022 +0300 - - fix: Fixed git fatal error in Dockerfile (#372) - -commit cee7608f4b6355385cbf6078c95b7322ac2d5f91 -Author: semantic-release-bot -Date: Mon Apr 18 16:17:47 2022 +0000 - - chore(release): version 1.68.0 [skip ci] - - # [1.68.0](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.67.0...v1.68.0) (2022-04-18) - - ### Features - - * Removed `coreutils` (realpath) from dependencies for MacOS ([#368](https://github.com/antonbabenko/pre-commit-terraform/issues/368)) ([944a2e5](https://github.com/antonbabenko/pre-commit-terraform/commit/944a2e5fefd50df6130c68bcaa4beb4d770c11b9)) - -commit 944a2e5fefd50df6130c68bcaa4beb4d770c11b9 -Author: Maksym Vlasov -Date: Mon Apr 18 19:17:15 2022 +0300 - - feat: Removed `coreutils` (realpath) from dependencies for MacOS (#368) - -commit 4874cfe42e447c29f630d3394df43543f9715f24 -Author: Maksym Vlasov -Date: Sat Apr 16 19:06:58 2022 +0300 - - chore: Add docker image tests - `container-structure-test-config` and `dive-ci` (#365) - -commit f1822ed810dcb545a08105c124b85f7cf5bf25f7 -Author: Maksym Vlasov -Date: Sat Apr 16 15:51:12 2022 +0300 - - docs: Document `--terraform-plan-flags` usage limitations for infracost (#364) - -commit ee8c60e3005fdb20962a5a2551139f8e9fd909f4 -Author: Maksym Vlasov -Date: Sat Apr 16 15:30:05 2022 +0300 - - chore: Avoid mention issue 123 during releases (#366) - -commit c5462f6bf9a4cac24b52fde3ec567424246cbb71 -Author: semantic-release-bot -Date: Fri Apr 15 17:27:01 2022 +0000 - - chore(release): version 1.67.0 [skip ci] - - # [1.67.0](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.66.0...v1.67.0) (2022-04-15) - - ### Features - - * Added `terraform_checkov` (run per folder), deprecated `checkov` hook ([#290](https://github.com/antonbabenko/pre-commit-terraform/issues/290)) ([e3a9834](https://github.com/antonbabenko/pre-commit-terraform/commit/e3a98345bb3be407c476749496827b418b81241c)) - -commit e3a98345bb3be407c476749496827b418b81241c -Author: Bruno Ferreira -Date: Fri Apr 15 18:26:33 2022 +0100 - - feat: Added `terraform_checkov` (run per folder), deprecated `checkov` hook (#290) - -commit b35dc171d8092c86452b433cb0cefa622fdb0921 -Author: semantic-release-bot -Date: Wed Apr 13 17:25:38 2022 +0000 - - chore(release): version 1.66.0 [skip ci] - - # [1.66.0](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.65.1...v1.66.0) (2022-04-13) - - ### Features - - * Added support for `tfupdate` to update version constraints in Terraform configurations ([#342](https://github.com/antonbabenko/pre-commit-terraform/issues/342)) ([ef7a0f2](https://github.com/antonbabenko/pre-commit-terraform/commit/ef7a0f2b467d20f30341d25df3d4012cff2194ec)) - -commit ef7a0f2b467d20f30341d25df3d4012cff2194ec -Author: Julien Rottenberg -Date: Wed Apr 13 10:25:04 2022 -0700 - - feat: Added support for `tfupdate` to update version constraints in Terraform configurations (#342) - -commit 35c45509eeca95a711900c694a414f57ddd0b41d -Author: Maksym Vlasov -Date: Wed Apr 13 19:51:45 2022 +0300 - - chore: Fix docker test pipeline (#362) - -commit ca6737c0efd51137609065510630ea24ce632a9e -Author: semantic-release-bot -Date: Wed Apr 13 16:11:15 2022 +0000 - - chore(release): version 1.65.1 [skip ci] - - ## [1.65.1](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.65.0...v1.65.1) (2022-04-13) - - ### Bug Fixes - - * Improve `tflint --init` command execution ([#361](https://github.com/antonbabenko/pre-commit-terraform/issues/361)) ([d31cb69](https://github.com/antonbabenko/pre-commit-terraform/commit/d31cb6936376bd1aaa9ada83021c29e6ca6727e0)) - -commit d31cb6936376bd1aaa9ada83021c29e6ca6727e0 -Author: Maksym Vlasov -Date: Wed Apr 13 19:10:40 2022 +0300 - - fix: Improve `tflint --init` command execution (#361) - -commit 896cbff5ed5bee27ad8ad20245719f97966aa6ee -Author: semantic-release-bot -Date: Wed Apr 13 14:23:07 2022 +0000 - - chore(release): version 1.65.0 [skip ci] - - # [1.65.0](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.64.1...v1.65.0) (2022-04-13) - - ### Features - - * Adding init to terraform_tflint hook ([#352](https://github.com/antonbabenko/pre-commit-terraform/issues/352)) ([1aff30f](https://github.com/antonbabenko/pre-commit-terraform/commit/1aff30f2a4cb0df65a1e693690b5225a112cf621)) - -commit 1aff30f2a4cb0df65a1e693690b5225a112cf621 -Author: Andrew Glenn <29951057+andrew-glenn@users.noreply.github.com> -Date: Wed Apr 13 09:15:15 2022 -0500 - - feat: Adding init to terraform_tflint hook (#352) - -commit ac54720b9185ae3fc960af48769e80c01bfdaac2 -Author: Maksym Vlasov -Date: Wed Apr 13 17:04:07 2022 +0300 - - chore: Fix linter (#360) - -commit 9627c48349c7ddf93968c5c05435372a9b52ed7f -Author: semantic-release-bot -Date: Thu Mar 31 12:39:27 2022 +0000 - - chore(release): version 1.64.1 [skip ci] - - ## [1.64.1](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.64.0...v1.64.1) (2022-03-31) - - ### Bug Fixes - - * Make hooks bash 3.2 compatible ([#339](https://github.com/antonbabenko/pre-commit-terraform/issues/339)) ([4ad825d](https://github.com/antonbabenko/pre-commit-terraform/commit/4ad825d8d39254c69f0e01fb3e7728f0be9acbb9)) - -commit 4ad825d8d39254c69f0e01fb3e7728f0be9acbb9 -Author: Maksym Vlasov -Date: Thu Mar 31 15:38:51 2022 +0300 - - fix: Make hooks bash 3.2 compatible (#339) - -commit 7e6c287d16bf71df3ee926ab52747a81ebed0068 -Author: Maksym Vlasov -Date: Tue Mar 15 17:20:05 2022 +0200 - - chore: Actualize README (#350) - -commit 908ec70ea6dfb7d448aa69154e67a9795f1c1bd0 -Author: Maksym Vlasov -Date: Mon Mar 14 16:06:34 2022 +0200 - - Add important notes about project (#348) - -commit 83b39d935a22f8f41bd8b2ec529af35b284cd668 -Author: drewmullen -Date: Tue Feb 22 12:30:53 2022 -0500 - - docs: Fix README function `rm_terraform` to not erase .terraform-docs.yaml (#345) - -commit 458fb289a35544484272c55cd35b92c50125dbe1 -Author: Pasquale De Vita <59291437+pasqualedevita@users.noreply.github.com> -Date: Tue Feb 15 14:41:49 2022 +0100 - - chore: Add Docker latest and nightly tag (#343) - -commit e88abb68576841af14a8cd472a9dd9e58846e5a2 -Author: Maksym Vlasov -Date: Thu Feb 10 21:33:05 2022 +0200 - - chore: Fix docker test workflow (#340) - -commit c2d1a58a5e7e448a66f3f8bb561f58ee3c95a461 -Author: semantic-release-bot -Date: Thu Feb 10 18:48:50 2022 +0000 - - chore(release): version 1.64.0 [skip ci] - - # [1.64.0](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.63.0...v1.64.0) (2022-02-10) - - ### Features - - * Improved speed of `pre-commit run -a` for multiple hooks ([#338](https://github.com/antonbabenko/pre-commit-terraform/issues/338)) ([579dc45](https://github.com/antonbabenko/pre-commit-terraform/commit/579dc45fb40bc64c6742d42a9da78eddb0b70e1d)) - -commit 579dc45fb40bc64c6742d42a9da78eddb0b70e1d -Author: Maksym Vlasov -Date: Thu Feb 10 20:48:17 2022 +0200 - - feat: Improved speed of `pre-commit run -a` for multiple hooks (#338) - -commit c266d4036bd63b212a60f9b0264adff360349124 -Author: semantic-release-bot -Date: Thu Feb 10 15:54:13 2022 +0000 - - chore(release): version 1.63.0 [skip ci] - - # [1.63.0](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.62.3...v1.63.0) (2022-02-10) - - ### Features - - * Improve performance during `pre-commit --all (-a)` run ([#327](https://github.com/antonbabenko/pre-commit-terraform/issues/327)) ([7e7c916](https://github.com/antonbabenko/pre-commit-terraform/commit/7e7c91643e8f213168b95d0583f787f914b04ce4)) - -commit 7e7c91643e8f213168b95d0583f787f914b04ce4 -Author: Carlos Miguel Bustillo Rodríguez <20931458+carlosbustillordguez@users.noreply.github.com> -Date: Thu Feb 10 16:53:37 2022 +0100 - - feat: Improve performance during `pre-commit --all (-a)` run (#327) - -commit a80d3835d402bc95cfd174ec0ffa0de1134ddc1c -Author: Maksym Vlasov -Date: Thu Feb 10 17:51:09 2022 +0200 - - chore: fix bug intoduced in #316 (#335) - -commit 441e87a08ccb74a1750c029ee647796ba9844932 -Author: Mark Bainter -Date: Thu Feb 3 14:23:59 2022 -0600 - - docs: Add workaround for configuration_aliases tf bug (#332) - -commit 71647bb026d36db21271c95bd120c29edc00737c -Author: Mohit Saxena <76725454+mohitsaxenaknoldus@users.noreply.github.com> -Date: Wed Jan 12 02:06:35 2022 +0530 - - chore: Add Github Actions Workflow to build if Dockerfile updated (#318) - - Co-authored-by: Maksym Vlasov - -commit 47229003ffdc34e0644302c8526f71d1b114c82c -Author: Maksym Vlasov -Date: Tue Jan 11 19:20:29 2022 +0200 - - chore: Add hadolint check for Dockerfiles (#322) - - Co-authored-by: Balazs Hamorszky - -commit 321fb1669366f3087f6942af463b2d355120451a -Author: Maksym Vlasov -Date: Tue Jan 11 15:54:42 2022 +0200 - - chore: Document functions (based on google style guide) (#317) - -commit 661a0cf3463510156b388b18ef7a0c49db2f4ae9 -Author: Maksym Vlasov -Date: Tue Jan 11 13:12:29 2022 +0200 - - chore: Specify what we exactly mean (#320) - -commit c5f2a618a83f04113a3a27475663a709e2c83f5f -Author: Maksym Vlasov -Date: Thu Jan 6 17:09:51 2022 +0200 - - chore: Improved code structure (moved hooks into a separate dir) (#316) - -commit 3045dd55a3c0c5557f707ad3b0e841218008d19f -Author: Maksym Vlasov -Date: Thu Jan 6 15:08:18 2022 +0200 - - chore: Add shellcheck and make checks passing (#315) - - Co-authored-by: Anton Babenko - -commit 645f3fd126ba875ed4401ff3dc04dec8e391cbe0 -Author: Maksym Vlasov -Date: Thu Jan 6 13:25:32 2022 +0200 - - chore: Cleanup file with test data (#311) - -commit 1f16f09c6fb7c76af53a48dfce33626197615d51 -Author: Maksym Vlasov -Date: Thu Jan 6 13:21:52 2022 +0200 - - chore: Refactor all hooks (#310) - -commit ac9299cf5747910d46edd12f311a3fd024f1cb90 -Author: semantic-release-bot -Date: Wed Dec 22 18:45:26 2021 +0000 - - chore(release): version 1.62.3 [skip ci] - - ## [1.62.3](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.62.2...v1.62.3) (2021-12-22) - - ### Bug Fixes - - * Check all directories with changes and pass all args in terrascan hook ([#305](https://github.com/antonbabenko/pre-commit-terraform/issues/305)) ([66401d9](https://github.com/antonbabenko/pre-commit-terraform/commit/66401d93f485164fb2272af297df835b932c61c3)) - -commit 66401d93f485164fb2272af297df835b932c61c3 -Author: Carlos Miguel Bustillo Rodríguez <20931458+carlosbustillordguez@users.noreply.github.com> -Date: Wed Dec 22 19:44:53 2021 +0100 - - fix: Check all directories with changes and pass all args in terrascan hook (#305) - -commit 04ecd10343c066e91e3c4b6d53f111a54f0363fa -Author: semantic-release-bot -Date: Tue Dec 21 19:52:23 2021 +0000 - - chore(release): version 1.62.2 [skip ci] - - ## [1.62.2](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.62.1...v1.62.2) (2021-12-21) - - ### Bug Fixes - - * Properly exclude .terraform directory with checkov hook ([#306](https://github.com/antonbabenko/pre-commit-terraform/issues/306)) ([b431a43](https://github.com/antonbabenko/pre-commit-terraform/commit/b431a43ffa6cd13156485ef853c967856e9572ef)) - * Speedup `terrascan` hook up to x3 times in big repos ([#307](https://github.com/antonbabenko/pre-commit-terraform/issues/307)) ([2e8dcf9](https://github.com/antonbabenko/pre-commit-terraform/commit/2e8dcf9298733a256cc7f8c6f05b3ef9a1047a36)) - -commit 096245800e76333b914489abb5157d71aafaebb7 -Author: Maksym Vlasov -Date: Tue Dec 21 21:51:14 2021 +0200 - - chore: Release action should track hooks configuration changes (#308) - -commit 2e8dcf9298733a256cc7f8c6f05b3ef9a1047a36 -Author: Maksym Vlasov -Date: Tue Dec 21 21:50:12 2021 +0200 - - fix: Speedup `terrascan` hook up to x3 times in big repos (#307) - -commit b431a43ffa6cd13156485ef853c967856e9572ef -Author: Maksym Vlasov -Date: Tue Dec 21 21:18:52 2021 +0200 - - fix: Properly exclude .terraform directory with checkov hook (#306) - -commit d826474a12aa312152f01ae97ab5e12881a989fb -Author: semantic-release-bot -Date: Sat Dec 18 21:17:33 2021 +0000 - - chore(release): version 1.62.1 [skip ci] - - ## [1.62.1](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.62.0...v1.62.1) (2021-12-18) - - ### Bug Fixes - - * **terraform_tflint:** Restore current working directory behavior ([#302](https://github.com/antonbabenko/pre-commit-terraform/issues/302)) ([93029dc](https://github.com/antonbabenko/pre-commit-terraform/commit/93029dcfcf6b9b121c24573f3e647d9fde255486)) - -commit 77bd66192f90511f6d859c93c716ed0ddc3ff356 -Author: Anton Babenko -Date: Sat Dec 18 22:15:00 2021 +0100 - - chore: Use valid token for the Release GHA - -commit 93029dcfcf6b9b121c24573f3e647d9fde255486 -Author: Maxime Brunet -Date: Sat Dec 18 10:07:36 2021 -0800 - - fix(terraform_tflint): Restore current working directory behavior (#302) - -commit 59da4b81d61bb512fe6867eb9da713ed3b2a3c57 -Author: Anton Babenko -Date: Mon Dec 13 10:58:27 2021 +0100 - - chore: Publish container image only after the release - -commit 21185f6db4c4ebfb1998bc5aab96585eb8b60e82 -Author: Anton Babenko -Date: Mon Dec 13 10:51:03 2021 +0100 - - chore: Fixed allowed types for PR titles - -commit b8f90bd057594961b2f53d030294420dd781c0bb -Author: Anton Babenko -Date: Sun Dec 12 21:41:23 2021 +0100 - - chore: Updated validation PR title types (#298) - -commit 8c063c782462c2f8638f04d6283882a128a445fd -Author: Anton Babenko -Date: Sun Dec 12 21:08:14 2021 +0100 - - chore: Validate PR title (#297) - -commit e1bccb7585af9fc64c7eeb8af04694cfc700cea0 -Author: semantic-release-bot -Date: Sun Dec 12 19:29:33 2021 +0000 - - chore(release): version 1.62.0 [skip ci] - - # [1.62.0](https://github.com/antonbabenko/pre-commit-terraform/compare/v1.61.0...v1.62.0) (2021-12-12) - - ### Features - - * Added semantic release ([#296](https://github.com/antonbabenko/pre-commit-terraform/issues/296)) ([1bcca44](https://github.com/antonbabenko/pre-commit-terraform/commit/1bcca44d1677128c23d505be644f1d16c320eb4c)) - -commit 1bcca44d1677128c23d505be644f1d16c320eb4c -Author: Anton Babenko -Date: Sun Dec 12 20:28:30 2021 +0100 - - feat: Added semantic release (#296) - -commit 00a5ef032581e4334f3cd3b31bfc9cc93c4b4870 -Author: Anton Babenko -Date: Sat Dec 11 14:34:55 2021 +0100 - - Updated CHANGELOG - -commit 45575c3a434a8a76c1f62de824e5156edf887086 -Author: Maxime Brunet -Date: Sat Dec 11 05:33:22 2021 -0800 - - feat: Pass custom arguments to terraform init in `terraform_validate` hook (#293) - -commit 7c6ad7cfb40d92e8f49cb0a3dd412c7509d5aeda -Author: Bruno Ferreira -Date: Wed Dec 8 21:06:30 2021 +0000 - - fix: analyse all folders with tflint and don't stop on first execution (#289) - -commit 141f815e810dfdd2dc3c5d0c605e883f4e5e14de -Author: Anton Babenko -Date: Wed Dec 8 20:03:43 2021 +0100 - - Updated CHANGELOG - -commit 01d262caaae1fe0a886e5e8e16a58a1bffd5713c -Author: Maksym Vlasov -Date: Wed Dec 8 21:03:04 2021 +0200 - - fix: pre-build docker image (#292) - -commit 31e7ccf1b76b477441136eef21f24b9f91695dda -Author: Anton Babenko -Date: Mon Dec 6 15:57:13 2021 +0100 - - Updated CHANGELOG - -commit 4543f10a8ea1b9c522b931b1c2e3331b832ecfc0 -Author: sg70 -Date: Mon Dec 6 15:55:06 2021 +0100 - - fix: Fixed docker build (#288) - -commit 6a064b19e4730a42cc19b2793f617f97a0d2e262 -Author: Anton Babenko -Date: Sat Nov 20 11:28:49 2021 +0100 - - Updated CHANGELOG - -commit 003cd1da3cce54451aff474420d3a004ec5364f5 -Author: Birger J. Nordølum -Date: Sat Nov 20 11:28:03 2021 +0100 - - chore: Publish container image on release (#285) - -commit 3b4be67fdb4476f7abd36feeba074ab67dc1cad5 -Author: Maksym Vlasov -Date: Wed Nov 17 22:21:09 2021 +0200 - - chore: Fix master merge to working branch on pre-commit autofixes (#286) - -commit c5bcad45bba430466b4171978a9c3d58562d2bfb -Author: Anton Babenko -Date: Wed Nov 17 19:17:50 2021 +0100 - - Updated CHANGELOG - -commit feabecc9b3461fff58e0a29541854d3e7a5402c0 -Author: Milos Jajac -Date: Wed Nov 17 19:16:38 2021 +0100 - - fix: typo in arg name for terraform-docs (#283) - -commit af10d4f082b496a86f1c5cc80e6e1faaedc69c39 -Author: Maksym Vlasov -Date: Mon Nov 8 22:28:02 2021 +0200 - - chore: Add deprecation notice to `terraform_docs_replace` (#280) - -commit d4ae82fa95714afe0370e7967d7818612b85fafc -Author: Anton Babenko -Date: Mon Nov 8 09:53:57 2021 +0100 - - Updated CHANGELOG - -commit 71302a9a56ccd9fee424f4bb978dc4e2e1ac13f2 -Author: Maksym Vlasov -Date: Mon Nov 8 10:51:08 2021 +0200 - - feat: Updated Docker image from Ubuntu to Alpine (#278) - -commit 32dae32273c9a1f4bd20f2425301c669ba5c757c -Author: Maksym Vlasov -Date: Fri Oct 29 16:42:05 2021 +0300 - - chore: Updated messages shown in terraform_tflint hook (#274) - -commit 57b94a29ec2f7aed0e0790c5745282ac93e65749 -Author: Anton Babenko -Date: Wed Oct 27 17:28:30 2021 +0200 - - Updated CHANGELOG - -commit 4c509434e0bd9da72b7f400b0e8a2be01c99bdd8 -Author: Maksym Vlasov -Date: Wed Oct 27 18:28:05 2021 +0300 - - fix: Fixed 1.54.0 where `terraform_docs` was broken (#272) - -commit cf0844cd31cc15ec66bb7cec4056ce8018d05d23 -Author: Anton Babenko -Date: Wed Oct 27 14:40:17 2021 +0200 - - Updated CHANGELOG - -commit e2604eacfaafd878cff351a6ce07c9a02cd5fdc4 -Author: Maksym Vlasov -Date: Wed Oct 27 14:45:25 2021 +0300 - - feat: Add support for quoted values in `infracost_breakdown` `--hook-config` (#269) - -commit 15cac9087438b51de9a29079bf1156668eaf2593 -Author: Anton Babenko -Date: Tue Oct 26 17:40:24 2021 +0200 - - docs: Added notes about sponsors (#268) - -commit 01a6170d3685e8ec5a553cc720fb738dc6cd59d0 -Author: Maksym Vlasov -Date: Tue Oct 26 16:56:41 2021 +0300 - - fix: Fixed args expand in terraform_docs (#260) - -commit bb880b0f91dffb4d9d23651d87ce79f05326cd52 -Author: Anton Babenko -Date: Tue Oct 26 14:40:17 2021 +0200 - - Updated CHANGELOG - -commit 9656159025264c0d50032a48d0e58ad3c15f388b -Author: Anton Babenko -Date: Tue Oct 26 14:39:23 2021 +0200 - - docs: Pre-release 1.53 (#267) - -commit 3d5a882a53f5e446b10e326db0087c2ee58608c8 -Author: Maksym Vlasov -Date: Tue Oct 26 15:35:55 2021 +0300 - - docs: Clarify docs for terraform_tfsec hook (#266) - -commit cff42e6d6fe8cc33f4a7033e7f945e0668c32be8 -Author: Maksym Vlasov -Date: Tue Oct 26 14:12:01 2021 +0300 - - feat: Add infracost_breakdown hook (#252) - -commit cc59119c174106747453473c4a6e3d775c555c60 -Author: Maksym Vlasov -Date: Mon Oct 25 21:31:55 2021 +0300 - - feat: Set up PR reviewers automatically (#258) - -commit a0f69e3ba784762285ad3e097bb33c463340f042 -Author: Maksym Vlasov -Date: Mon Oct 25 21:10:36 2021 +0300 - - docs: fix protocol to prevent MITM (#257) - -commit 2973f85f3ba5f8f5b4610cce9b01a7ce26510c84 -Author: gravitybacklight <2327204+gravitybacklight@users.noreply.github.com> -Date: Thu Oct 21 15:13:34 2021 +0100 - - feat: add __GIT_WORKING_DIR__ to tfsec (#255) - -commit c0b9b3c5622f09123d21570807b0005c57bcb2b5 -Author: Dan Arnold -Date: Tue Oct 19 03:29:27 2021 -0700 - - docs: Add missing space in terrascan install cmd (#253) - -commit e33c654a4005cff364a42f965068160e4ba3e3c2 -Author: Maksym Vlasov -Date: Fri Oct 15 23:09:13 2021 +0300 - - fix: command not found (#251) - -commit 390a2645f281163a04fea78e219eceb00c48addd -Author: Maksym Vlasov -Date: Fri Oct 15 22:11:01 2021 +0300 - - fix: execute tflint once in no errors (#250) - -commit 762f7b252539cbf31d43bd4f89e1eb969f3c8988 -Author: Maksym Vlasov -Date: Fri Oct 15 15:37:49 2021 +0300 - - docs: fix deps (#249) - -commit 7b11401863b29fc8c83a1e74584ac99dc50630ec -Author: Maksym Vlasov -Date: Fri Oct 15 15:26:23 2021 +0300 - - feat: Add `terraform_docs` hook settings (#245) - -commit 3f6643280eb25021d8498e9abf930261377fe829 -Author: Maksym Vlasov -Date: Fri Oct 15 15:24:50 2021 +0300 - - fix: terrafrom_tflint ERROR output for files located in repo root (#243) - -commit 25cddd988093033a6e2ee013571201e4bb89ca47 -Author: Maksym Vlasov -Date: Fri Oct 15 15:19:41 2021 +0300 - - feat: Add support for specify terraform-docs config file (#244) - -commit e6aad1731052de5877672aab897c7e3463f9790d -Author: Maksym Vlasov -Date: Fri Oct 15 15:08:26 2021 +0300 - - docs: Document hooks dependencies (#247) - -commit de2f6249eee3351131017d0899aa6f10107eb568 -Author: Robin Bowes -Date: Thu Oct 14 17:20:25 2021 +0100 - - feat: Allow passing of args to terraform_fmt (#147) - -commit 8a6e4bf4e69060c99a605b53a075db6c1a788d6b -Author: Maksym Vlasov -Date: Thu Oct 14 16:25:45 2021 +0300 - - docs: Add terraform_fmt usage instructions and how-to debug script with args (#242) - -commit 71f7c347c99b30a7275d3f3dddc5364b28394f6c -Author: Maksym Vlasov -Date: Thu Oct 14 14:35:19 2021 +0300 - - fix: TFSec outputs the same results multiple times (#237) - -commit 3ae5eb00b6cee2c4a9f3ee049bfda39d20335312 -Author: Maksym Vlasov -Date: Thu Oct 14 14:23:24 2021 +0300 - - chore: Do not mark issues and PR's in milestone as stale (#241) - -commit 884446e4d6d9687ce78faf3cc372a3e63984e312 -Author: Anton Babenko -Date: Mon Oct 4 13:16:48 2021 +0200 - - Updated CHANGELOG - -commit d69e86d48b5f70db64608d1a2e5cd6067955014c -Author: Sergei Ivanov -Date: Mon Oct 4 12:16:15 2021 +0100 - - feat: Add new hook for `terraform providers lock` operation (#173) - -commit f7e28e1bae20254cb265e71a1cd31b52b4bd1214 -Author: Maksym Vlasov -Date: Fri Oct 1 21:52:35 2021 +0300 - - docs: Document terraform_tfsec args usage (#238) - -commit 013d3084c31b31f1784485f90568dc42ac51ee98 -Author: Maksym Vlasov -Date: Fri Oct 1 19:53:53 2021 +0300 - - docs: Make contributors more visible (#236) - -commit c8fb4081f791071c89e2e9e758344f1e9d1d85e7 -Author: Maksym Vlasov -Date: Fri Oct 1 19:31:14 2021 +0300 - - docs: Add contributing guide and docs about performance tests (#235) - -commit 3404eede1eb643bd33d14f8f069224047b51a739 -Author: Javier Collado -Date: Fri Oct 1 13:29:07 2021 +0200 - - fix: terraform_tflint hook executes in a serial way to run less often (#211) - -commit ce02cd137e59d4f0924d382aa56a9266c2d6fea1 -Author: Maksym Vlasov -Date: Thu Sep 30 17:28:11 2021 +0300 - - feat: Add PATH outputs when TFLint found any problem (#234) - -commit 3bdcf51a978e4ad0dbc3291c1c1ac6692e65b1a3 -Author: balihb -Date: Thu Sep 30 14:23:07 2021 +0200 - - fix: Dockerfile if INSTALL_ALL is not defined (#233) - -commit 98a8e4048f669eb99b38c8f773aa5582eef87741 -Author: Maksym Vlasov -Date: Wed Sep 29 14:36:55 2021 +0300 - - docs: Describe hooks usage and improve examples (#232) - - Co-authored-by: Anton Babenko - -commit cf6603c9493e634e1800dd59cf797977c78ca19d -Author: Maksym Vlasov -Date: Wed Sep 29 12:29:05 2021 +0300 - - chore: Add shfmt to workflow (#231) - -commit ff54bb44aaafa11dcdc20f7884645641a8bcd179 -Author: Sergei Ivanov -Date: Mon Sep 20 14:46:36 2021 +0100 - - fix: remove dead code from terraform-docs script (#229) - -commit 299ef1208b093bce9d6aadbeb1b20576c0c9a0b5 -Author: Anton Babenko -Date: Fri Sep 17 16:48:55 2021 +0200 - - Updated CHANGELOG - -commit b67dbd90496cf5b2846284466a3201c94b1960a8 -Author: Sergei Ivanov -Date: Fri Sep 17 15:48:24 2021 +0100 - - fix: trigger terraform-docs on changes in lock files (#228) - -commit 4faee7b12b741f9c58de438e082571ebe72883da -Author: Maksym Vlasov -Date: Wed Sep 15 13:57:58 2021 +0200 - - fix: label auto-adding after label rename (#226) - -commit 7a8c6e109e1a321dfddfd9617bbe1c50bf440e6d -Author: Maksym Vlasov -Date: Tue Sep 14 13:37:22 2021 +0200 - - chore: Updated GH stale action config (#223) - -commit 53a866e7752885b8854a413fd76e397677050d4c -Author: Maksym Vlasov -Date: Sat Sep 11 10:47:56 2021 +0300 - - feat: Add GH checks and templates (#222) - -commit c920368fb2485e0dde8cd9956adb2cf9fa230da0 -Author: Maksym Vlasov -Date: Fri Sep 10 22:33:03 2021 +0300 - - feat: Add mixed line ending check to prevent possible errors (#221) - -commit ce02f94e46635b23087e29e746f0461c6993fee2 -Author: Maksym Vlasov -Date: Thu Sep 9 22:29:33 2021 +0300 - - fix: Dockerized pre-commit-terraform (#219) - - Co-authored-by: Anton Babenko - -commit 5daffe87271a154e9199c5113540e5ef6438a65a -Author: Maksym Vlasov -Date: Thu Sep 9 12:38:43 2021 +0300 - - docs: Initial docs improvement (#218) - -commit c7d6d002ed510c1a3e63af6d0e132e8abf2448d4 -Author: Lorenz Vanthillo -Date: Tue May 4 16:41:28 2021 +0200 - - chore: Update Ubuntu install method (#198) - -commit 9b84f70efef7419e53c9526dff2e4a7d6bc9c78d -Author: Anton Babenko -Date: Thu Apr 22 22:16:26 2021 +0200 - - Updated CHANGELOG - -commit fee2387b6ce595773cd3437ca2cc4081061f5fbb -Author: Cesar Rodriguez -Date: Thu Apr 22 16:15:00 2021 -0400 - - feat: Adds support for Terrascan (#195) - -commit 96346e74d90467918729f8acafccd56c47e1be68 -Author: Anton Babenko -Date: Tue Apr 20 12:13:58 2021 +0200 - - Updated CHANGELOG - -commit d27074b5a03fb4ccfb9261c9999411af2358a742 -Author: Manuel Vogel -Date: Tue Apr 20 12:13:25 2021 +0200 - - fix: Fix and pin versions in Dockerfile (#193) - -commit fa3859e55f31a921152c0047f67edb62b564ebbc -Author: Sergio Kef -Date: Wed Mar 24 21:12:24 2021 +0100 - - chore: Fix mistake on command (#185) - -commit bec7b5d943953f0c19afb22cbe2eae4689d937f3 -Author: Anton Babenko -Date: Thu Mar 18 09:13:10 2021 +0100 - - Update README.md - -commit 257824c637d2a4ef7843c792eb088dc8bc2c6140 -Author: Anton Babenko -Date: Fri Mar 12 15:36:00 2021 +0100 - - Updated CHANGELOG - -commit 36a269f1093a76a8ef6d603b35cb067380cac70f -Author: Manuel Vogel -Date: Fri Mar 12 15:35:21 2021 +0100 - - chore: add dockerfile (#183) - -commit 53de83359eb2426668266094f5f73ef7651921f9 -Author: Manuel Vogel -Date: Fri Mar 12 10:32:41 2021 +0100 - - docs: Added checkov install (#182) - -commit 47b80ec9d58e38679bc6caae9253efa2d5325b0c -Author: Anton Babenko -Date: Thu Feb 25 20:47:19 2021 +0100 - - Updated CHANGELOG - -commit 90d45213a304bb5b2f90876f6f2621e1a87c92da -Author: chopped pork -Date: Thu Feb 25 19:46:51 2021 +0000 - - fix: remove sed postprocessing from the terraform_docs_replace hook to fix compatibility with terraform-docs 0.11.0+ (#176) - -commit ad5dccae65a1508497dd638c7b511099296edaf3 -Author: Manuel Vogel -Date: Thu Feb 25 17:03:46 2021 +0100 - - docs: updates installs for macOS and ubuntu (#175) - -commit f189a114b1771f473654606105f3edd9288369a7 -Author: Anton Babenko -Date: Sat Feb 20 20:18:54 2021 +0100 - - Updated CHANGELOG - -commit 827af52cd2ab47a67e15ecfa978cf00a53d67065 -Author: Anton Babenko -Date: Sat Feb 20 20:18:07 2021 +0100 - - fix: Terraform validate for submodules (#172) - -commit 4f6e84905971ddf36f486e912f25878b135debe5 -Author: Anton Babenko -Date: Thu Nov 12 11:58:02 2020 +0100 - - Updated CHANGELOG - -commit 3a07570ddb9f8e5a6a3d3fd9164ef6ae8694883e -Author: Shawn -Date: Thu Nov 12 05:55:53 2020 -0500 - - fix: Correct deprecated parameter to terraform-docs (#156) - -commit fe2d121d123cd3147d849dd0a825e534da976008 -Author: Anton Babenko -Date: Mon Nov 2 21:48:24 2020 +0100 - - Updated CHANGELOG - -commit d303bff1f9a7fadc4b22db6a642861de6dfca2c9 -Author: Anton Babenko -Date: Mon Nov 2 21:44:54 2020 +0100 - - feat: Make terraform_validate to run init if necessary (#158) - -commit 84374f64a05e53a23d8e23177db09ae964434f64 -Author: Anton Babenko -Date: Thu Sep 24 21:44:33 2020 +0200 - - Updated CHANGELOG - -commit d773f4ad79e185710ca52fab5f66c0e6c3e6b12c -Author: Evan Stoddard -Date: Thu Sep 24 14:44:05 2020 -0500 - - fix: Fix regex considering terraform-docs v0.10.0 old (#151) - -commit 6b03062a175a01321946fdbb774e655938c97034 -Author: Anton Babenko -Date: Thu Sep 24 13:35:05 2020 +0200 - - Updated CHANGELOG - -commit 81770aa0fab607a0c2472f06c94afc7bff4fdc44 -Author: Matias Zilli -Date: Thu Sep 24 11:37:08 2020 +0200 - - fix: make terraform_docs Windows compatible (#129) - -commit cc4e5e85ba3674d36ea61d85e5d9a1144ae71cb9 -Author: Anton Babenko -Date: Wed Sep 23 22:12:01 2020 +0200 - - Updated CHANGELOG - -commit 6f3b12514bb6c0c39dcdd095b873040411d31d79 -Author: Anton Babenko -Date: Wed Sep 23 22:11:09 2020 +0200 - - fix: terraform-docs version 0.10 removed with-aggregate-type-defaults (#150) - -commit 4a611121b6655127d8f94afca34cf668c81c4ae9 -Author: Anton Babenko -Date: Tue Sep 22 14:22:58 2020 +0200 - - Updated CHANGELOG - -commit cf07b5ea3ff76d82f9352aad6dc37e43aa769f9d -Author: Anton Babenko -Date: Tue Sep 22 14:20:27 2020 +0200 - - feat: Add possibility to share tflint config file for subdirs (#149) - -commit e4ab41045db17eb0e89a87618ffd9482c4818330 -Author: Anton Babenko -Date: Tue Sep 8 15:11:27 2020 +0200 - - Updated CHANGELOG - -commit 293b64c0eaa38bcdd79a5576243bc2949378ff32 -Author: Anton Babenko -Date: Tue Sep 8 15:10:56 2020 +0200 - - feat: Add checkov support (#143) - -commit 45e16de525ef5a48dc3d30b180214c07468571b8 -Author: Anton Babenko -Date: Mon Sep 7 16:04:03 2020 +0200 - - Updated CHANGELOG - -commit f2cab31bc41e913ea63b92b6fc0b3b6e2a2c039a -Author: Sergei Ivanov -Date: Mon Sep 7 14:50:57 2020 +0100 - - fix: Correctly handle arrays in terraform_docs.sh (#141) - -commit f2e3a5f796d7a0d8436b18598e756da528654dcc -Author: Anton Babenko -Date: Tue Sep 1 20:46:37 2020 +0200 - - Updated CHANGELOG - -commit 077c423cc5c8babe13e394cd3e73c86ceefc5191 -Author: nkazarian-spokeo <51686594+nkazarian-spokeo@users.noreply.github.com> -Date: Tue Sep 1 11:45:36 2020 -0700 - - fix: make terraform_tfsec.sh executable (#140) - -commit c8c25ec064bd064ca087d52d2b9ead68b6f58c7a -Author: Anton Babenko -Date: Tue Sep 1 10:09:26 2020 +0200 - - Updated CHANGELOG - -commit 108c75f9798a9cc8a7ecefcf8924cb50edea0ff4 -Author: nkazarian-spokeo <51686594+nkazarian-spokeo@users.noreply.github.com> -Date: Tue Sep 1 01:07:08 2020 -0700 - - feat: have option for terraform_tfsec hook to only run in relevant modified directories (#135) - -commit 266906591c92a974b30cbd5cb1f6f562a8e33594 -Author: Anton Babenko -Date: Fri Aug 28 09:03:59 2020 +0200 - - Updated CHANGELOG - -commit 6c77a6cdc9ff00af50ca7b435ca8ecfa0f7bee1d -Author: Robin Bowes -Date: Fri Aug 28 08:03:38 2020 +0100 - - fix: Squash terraform_docs bug (#138) - -commit 861c1166f9a1cf1a9ace8e81c38ffed1902e20d9 -Author: Anton Babenko -Date: Thu Aug 27 21:56:48 2020 +0200 - - Updated CHANGELOG - -commit 1d8af371d43e8ee48ac4b4074244436faa13cb86 -Author: Robin Bowes -Date: Thu Aug 27 20:55:28 2020 +0100 - - chore: Use lib_getopt for all hooks and some style tweaks (#137) - -commit 0c5cbb380bef5c7625c9479de2a08bfc98c3009b -Author: Anton Babenko -Date: Thu Aug 27 11:58:35 2020 +0200 - - Updated CHANGELOG - -commit 774c63e772f1d933a066ae59ca74e7137f1d982a -Author: Robin Bowes -Date: Thu Aug 27 10:57:45 2020 +0100 - - fix: Pass args and env vars to terraform validate (#125) - -commit 994653c507cd67a160b066e1552e6f6b5df25ec0 -Author: Khosrow Moossavi -Date: Wed Aug 19 06:06:55 2020 -0400 - - docs: Update terraform-docs link pointing to new organization (#130) - -commit dafe42560ace053a00e5902931972ba9f28b7d5c -Author: Anton Babenko -Date: Wed Aug 19 12:02:43 2020 +0200 - - Updated CHANGELOG - -commit f6caf2195ac53fd31990a526e20f7a05ca37466d -Author: Prahalad Ramji -Date: Wed Aug 19 20:01:42 2020 +1000 - - feat: add terragrunt validate hook (#134) - -commit 2e40ade8d0bdff4eea5fb64e55d6f40a71768426 -Author: Anton Babenko -Date: Wed May 27 10:36:23 2020 +0200 - - Updated CHANGELOG - -commit 27e63693395ce9965d52e6e23844cc792a145983 -Author: Anton Babenko -Date: Wed May 27 10:35:15 2020 +0200 - - fix: Updated formatting in README (closes #113) - -commit 85ec8a49bec3ea8e3b749f2650b92b6da64fdeb0 -Author: snolan-uturn <50503078+snolan-uturn@users.noreply.github.com> -Date: Wed Apr 29 15:06:02 2020 -0500 - - docs: Fixed the docs to use the latest config syntax(#106) - -commit d174ca951460cf5328720b193879d0b6cdf705db -Author: gchappell99 <44392051+gchappell99@users.noreply.github.com> -Date: Wed Apr 29 10:35:31 2020 +0100 - - docs: Added coreutils as requirements in README.md (#105) - -commit 750e16dec0b3fae63469c9839b9d187472039a3d -Author: Anton Babenko -Date: Thu Apr 23 17:00:31 2020 +0200 - - Updated CHANGELOG - -commit 5bd4e2e14b0fd4584150e82cd5313e8f4e387c4f -Author: Anton Babenko -Date: Thu Apr 23 16:58:40 2020 +0200 - - Updated pre-commit deps - -commit 2be8fe54537c12e98188963266bb5fabc79b527b -Author: Jon Proietti <45764555+jon-proietti-nutrien@users.noreply.github.com> -Date: Thu Apr 23 09:56:33 2020 -0500 - - feat: Support for TFSec (#103) - -commit 29fa14037b7e56e7fe91decbe2d5a528fda9ad37 -Author: Anton Babenko -Date: Sat Apr 4 08:25:11 2020 +0200 - - Updated CHANGELOG - -commit 7694fb9b9a2187670f55233d0317c05f6b0080d5 -Author: Nick M <50747025+mcdonnnj@users.noreply.github.com> -Date: Sat Apr 4 02:17:25 2020 -0400 - - fix: Change terraform_validate hook functionality for subdirectories with terraform files (#100) - - * Update terraform_validate.sh: - -Change to the directory before running terraform validate to use the Terraform - configuration for the appropriate working directory. - - * Neglected to change the terraform validate call to use the default of the - current directory. - - * Several changes to improve functionality: - - Switch to checking the path for '*.tf' instead of always checking the current - directory. - - Try to find a '.terraform' directory (which indicates a `terraform init`) and - change to that directory before running `terraform validate`. - - * Fix the description for the terraform_validate hook to reflect changes that were - made in: - https://github.com/antonbabenko/pre-commit-terraform/commit/35e0356188b64a4c5af9a4e7200d936e514cba71 - - * - Clean up comments. - - Adjust variable names to better reflect what they are holding. - -commit 8cbcd8ea2b3aff6e2c64daefd681b9c07bbd36b8 -Author: Anton Babenko -Date: Sat Apr 4 07:55:09 2020 +0200 - - Updated CHANGELOG - -commit b0d4a68b892f9543cada942767ed95cb88adeef9 -Author: Sergei Ivanov -Date: Sat Apr 4 06:55:01 2020 +0100 - - Allow passing multiple args to terraform-docs (#98) - -commit 800756d8950ce3dfccd76adc71afb86119bf8690 -Author: Maksym Vlasov -Date: Wed Mar 18 16:33:35 2020 +0200 - - Update installation instructions (#79) - - - Fix package name misspell - - TFlint migrate to another organization - -commit 0a75b5bafe3068ecc7d1f64c71dbc1ecfcc98019 -Author: Anton Babenko -Date: Mon Mar 2 15:49:27 2020 +0100 - - Updated CHANGELOG - -commit e402c03b6a7275cf3320d732ae792a0c4b61cda9 -Author: Martin Coxall -Date: Mon Mar 2 14:48:53 2020 +0000 - - corrected tflint documentation (#95) - -commit e321ff1b9cdf2ed8dcb6ceb7a26a5accc40abb3a -Author: Anton Babenko -Date: Fri Feb 21 13:48:05 2020 +0100 - - Updated CHANGELOG - -commit 59e48e4f04e8bdb93e27edc2fe08f8c96c632735 -Author: Anton Babenko -Date: Fri Feb 21 13:47:52 2020 +0100 - - Updated pre-commit-hooks - -commit 2ebb28ad16f35bac03021a0eb229d40cbdc6a2cb -Author: Anton Babenko -Date: Fri Feb 21 13:47:04 2020 +0100 - - Fixed exit code for terraform 0.11 branch in terraform_docs (#94) - -commit 7f7ce9eebba4b265121718cb1c5b619e40f168b0 -Author: Anton Babenko -Date: Thu Jan 30 11:18:50 2020 +0100 - - Updated CHANGELOG - -commit e990429660acabe17a55f6b64d91ea3b4f331abd -Author: Robson Roberto Souza Peixoto <124390+robsonpeixoto@users.noreply.github.com> -Date: Thu Jan 30 07:18:01 2020 -0300 - - Fixed tflint hook to iterate over files (#77) - -commit 47346044cb78f63a6c2e6de339fc2caa34960ca2 -Author: Anton Babenko -Date: Tue Jan 21 11:54:31 2020 +0100 - - Updated CHANGELOG - -commit 1e5b3af0d2234f8b5ff6d1da091ccfe87deacf30 -Author: Anton Babenko -Date: Tue Jan 21 11:54:13 2020 +0100 - - Added shfmt to autoformat shell scripts (#86) - -commit 07730a425a6798be7d92460dc204fd1f2015ef10 -Author: Anton Babenko -Date: Tue Jan 21 11:20:16 2020 +0100 - - Updated CHANGELOG - -commit b99e3500e18c3ae145ec519fdba54808318cfbec -Author: Konstantin Kirpichnikov <56006844+konstantin-recurly@users.noreply.github.com> -Date: Tue Jan 21 05:19:46 2020 -0500 - - Added support for terraform-docs 0.8.0 with proper support for Terraform 0.12 syntax (bye-bye awk) (#85) - -commit 9fd71e3934b369e477d4f66543679bdaa1c0d7eb -Author: Anton Babenko -Date: Mon Jan 13 11:41:09 2020 +0100 - - Updated CHANGELOG - -commit 76969eab80997f4dc0d4eb0cce7f5d497a5826ff -Author: Thierno IB. BARRY -Date: Mon Jan 13 11:40:35 2020 +0100 - - move terraform-docs args after markdown command (#83) - -commit 26ab873aa6fdbb50779e054b85e504386d662224 -Author: Anton Babenko -Date: Sat Nov 16 19:37:56 2019 +0100 - - Updated CHANGELOG - -commit 8bddc8b81cc2739b2af2f6932204108ee02f6327 -Author: chopped pork -Date: Sat Nov 16 18:37:23 2019 +0000 - - use getopt for args in the tflint hook, following the approach in terraform-docs (#75) - -commit cbf245833b4194520b04c0aa649973ea0df5cd71 -Author: Anton Babenko -Date: Sat Nov 2 12:16:31 2019 +0100 - - Updated CHANGELOG - -commit 6ffc42a4b5c1f194b9feacfa33e308ea7ea569b4 -Author: cytopia -Date: Sat Nov 2 12:15:33 2019 +0100 - - Fixes #65: terraform-docs should not fail if complex types contain 'description' keyword (#73) - -commit 657ce4ecf019b6964813a590fd0c3ed35e234a43 -Author: Anton Babenko -Date: Fri Nov 1 10:08:49 2019 +0100 - - Added FUNDING.yml - -commit eec9c884a1fed9ef87aa71ac14031898c14323f4 -Author: Maksym Vlasov -Date: Thu Oct 17 14:50:16 2019 +0300 - - Improve installation instructions and make README more readable (#72) - -commit a7b730a20b7ecb0f86a513430e6692f9ba1c387d -Author: Dave Gallant -Date: Sat Oct 12 05:39:06 2019 -0400 - - Update rev in README.md (#70) - - Updating the version in the README. - - In order for `terraform_tflint`, the rev must be at least `v1.19.0`. - -commit c823172b8436519494f4b466b0eac3929697b4ed -Author: Anton Babenko -Date: Tue Aug 20 21:34:52 2019 +0200 - - Updated CHANGELOG - -commit d5640fd4dc0e07ab4276409c1e8d2e8f9f1f1ddc -Author: Anton Babenko -Date: Tue Aug 20 21:34:42 2019 +0200 - - Updated README with terraform_tflint hook - -commit e0d3d614225017064ad47921ced90f04f7e15bd5 -Author: Costin GALAN -Date: Tue Aug 20 22:31:28 2019 +0300 - - Added support for TFLint with --deep parameter (#53) - - Added support for TFLint (https://github.com/wata727/tflint). - - Signed-off-by: Costin Galan - -commit dc8cf4844190ce81f214485917639d7cf7c308b9 -Author: Anton Babenko -Date: Tue Aug 20 21:17:41 2019 +0200 - - Updated CHANGELOG - -commit 7eb805fb0e1f2acb5dbfe8b04ff72fb3b31f5a2c -Author: Anton Babenko -Date: Tue Aug 20 21:16:30 2019 +0200 - - Updated README with terragrunt_fmt hook - -commit d8dfc2c0345a8a846ca7841e4bd58b7deab91810 -Author: Scott Crooks -Date: Tue Aug 20 20:38:40 2019 +0200 - - Formatter for Terragrunt HCL files (#60) - - * Formatter for Terragrunt HCL files - - * Adding Terragrunt documentation - -commit 4bebeac734da116cc5fe535643252724321521a7 -Author: Anton Babenko -Date: Tue Jun 25 14:35:00 2019 +0200 - - Updated CHANGELOG - -commit 83629157c22800f59ab59642f82abef3df31721a -Author: Anton Babenko -Date: Tue Jun 25 14:34:46 2019 +0200 - - Fixed enquoted types in terraform_docs (fixed #52) - -commit 3147a7c0ee5d06d783346a968aa2c0c4e104608b -Author: Eric Gonzales -Date: Wed Jun 19 06:10:21 2019 -0400 - - Fix typo in README (#51) - -commit 5d8d926848047866342fd9e211f3f81c5157cdfd -Author: Anton Babenko -Date: Tue Jun 18 21:18:18 2019 +0200 - - Updated CHANGELOG - -commit c9ecd72f5f5014b983ca2e87c431cbb8b2cc7eed -Author: Anton Babenko -Date: Tue Jun 18 21:17:57 2019 +0200 - - Add slash to mktemp dir (fixed #50) - -commit 59ffa65527d7628b0f87b665c167643515940a2f -Author: Anton Babenko -Date: Tue Jun 18 14:00:29 2019 +0200 - - Updated CHANGELOG - -commit 10854fcfa2202bd677446b2d298a0ea6119941fb -Author: Anton Babenko -Date: Tue Jun 18 13:58:49 2019 +0200 - - Fixed awk script for terraform-docs (kudos @cytopia) and mktemp on Mac (closes #47, #48, #49) - -commit d678da98103da31aee9c05b07b6ca9f68191e061 -Author: Leonhardt Wille -Date: Mon Jun 17 14:01:24 2019 +0200 - - Fix version in README.md (#46) - -commit 060249f2fe4df62f413ae412eff40820560e21de -Author: Anton Babenko -Date: Mon Jun 17 13:12:16 2019 +0200 - - Updated CHANGELOG - -commit 35e0356188b64a4c5af9a4e7200d936e514cba71 -Author: Paweł Szczepaniak -Date: Mon Jun 17 13:09:31 2019 +0200 - - Upgraded to work with Terraform >= 0.12 (#44) - -commit 9300d0f1942bf03f6a41225a445368014b2f5f62 -Author: Anton Babenko -Date: Mon Jun 17 12:47:58 2019 +0200 - - Updated CHANGELOG - -commit 8cddce38b0953e48c32909ba75408f50c6075e07 -Author: Anton Babenko -Date: Mon Jun 17 12:47:06 2019 +0200 - - Added support for terraform_docs for Terraform 0.12 (#45) - -commit dbf91086f31cef3fdf3652d62eae57ffce943568 -Author: Anton Babenko -Date: Mon May 27 09:34:00 2019 -0700 - - Updated CHANGELOG - -commit 5725b11b558a03eb787623d53a0c7c157cb75f3b -Author: Anton Babenko -Date: Mon May 27 09:33:32 2019 -0700 - - Added note about incompatibility of terraform-docs with Terraform 0.12 (#41) - -commit 418a5ec782f8ed37d804a539ef1b2d3c14bee8bf -Author: Anton Babenko -Date: Sat Apr 6 21:19:39 2019 +0200 - - Fixed broken "maintained badge" - -commit 249c02bb64e9f8a9b08a11c723fd78590cdccea2 -Author: Guido Dobboletta -Date: Tue Mar 5 02:16:55 2019 -0600 - - Update README.md (#36) - -commit 7eb9ca3f2f70302227d1315a66a5a868562c02b7 -Author: Anton Babenko -Date: Fri Mar 1 09:49:34 2019 +0100 - - Updated changelog - -commit a3771b5119231be9677934b88ee47203e9cb5a90 -Author: Tyler Christiansen -Date: Fri Mar 1 00:48:50 2019 -0800 - - fix check for errors at the end (#35) - -commit 2c842d94615268be20391c248b91b070e60c5912 -Author: Anton Babenko -Date: Thu Feb 21 09:43:31 2019 +0100 - - Bump new version - -commit beb4a677531027e2991cade71b9567995939845a -Author: Josiah Halme -Date: Thu Feb 21 19:38:50 2019 +1100 - - Add exit code for 'terraform validate' so pre-commit check fails (#34) - -commit 66214dcc4b092a81e0146b2e66745627386b90ee -Author: Anton Babenko -Date: Mon Feb 18 18:52:46 2019 +0100 - - Added CHANGELOG.md - -commit bc0e68bfd3ec0c777fcb511baf94af323d40c620 -Author: Anton Babenko -Date: Mon Feb 18 18:52:10 2019 +0100 - - Added chglog (hi @robinbowes :)) - -commit 175000320bdf39667fde509ffceafe644198ea07 -Merge: 3cdf8ec 57d924d -Author: Anton Babenko -Date: Mon Feb 18 18:38:45 2019 +0100 - - Merge pull request #33 from chrisgilmerproj/run_terraform_docs_in_serial - - Require terraform-docs runs in serial - -commit 57d924d5d4621d6e2635c8daea931b657f66f050 -Author: Chris Gilmer -Date: Fri Feb 8 15:24:06 2019 -0800 - - Require terraform-docs runs in serial to avoid pre-commit doing parallel operations on similar file paths - -commit 3cdf8ecd62915ccf3c70aa84c8fa755cb952f11f -Merge: a52b507 15c9f39 -Author: Anton Babenko -Date: Sat Dec 15 09:40:31 2018 +0100 - - Merge pull request #30 from RothAndrew/feature/fix_issue_29 - - Fix bug not letting terraform_docs_replace work in the root directory… - -commit 15c9f394d32708ad3d2735af9c73cb03a6bad1af -Author: rothandrew -Date: Fri Dec 14 17:03:14 2018 -0500 - - Fix bug not letting terraform_docs_replace work in the root directory of a repo - -commit a52b507a1835facfca102b02389fbe957338b009 -Merge: 7acd99e fe3ba02 -Author: Anton Babenko -Date: Fri Dec 14 22:24:41 2018 +0100 - - Merge pull request #27 from RothAndrew/feature/new_hook - - Add new hook for running terraform-docs which will replace content of README.md (using Python) - -commit fe3ba02d25e3c7baa7f0fd3f97aaf3f2c3db62c6 -Author: rothandrew -Date: Fri Dec 14 16:19:54 2018 -0500 - - fix typo - -commit d3fe87daeac07704ae27e02e87df719dd7c9ac9f -Author: rothandrew -Date: Fri Dec 14 16:16:42 2018 -0500 - - Address requested changes - -commit cbd26b20c7dcae9b15ccecc7bf76a5e1c0ffdc81 -Author: rothandrew -Date: Fri Dec 14 10:45:59 2018 -0500 - - Add `--dest` argument - -commit debe93a82be27d9dab99858372a33cdde196a320 -Author: rothandrew -Date: Fri Dec 14 09:23:54 2018 -0500 - - Address requested changes - -commit 9aa971c069da7ef66f0a30075e6b68f21f243059 -Author: rothandrew -Date: Thu Dec 13 22:16:01 2018 -0500 - - Add new hook for running terraform-docs with replacing README.md from doc in main.tf - -commit 7acd99eeb74fc0db102058d8ef53863b8a14c47a -Merge: e2760ca 2b71d4b -Author: Anton Babenko -Date: Tue Dec 11 20:22:07 2018 +0100 - - Merge remote-tracking branch 'origin/master' into pr25 - -commit e2760caf8d70875ca85d25b11a972e1f207217f8 -Author: Anton Babenko -Date: Tue Dec 11 20:21:49 2018 +0100 - - Added followup after #25 - -commit 2b71d4b3bbcd6191bec1da0239539f5f9197f064 -Merge: b7c5094 fbdd40a -Author: Anton Babenko -Date: Tue Dec 11 20:21:40 2018 +0100 - - Merge pull request #25 from getcloudnative/feat-pass-terraform-docs-opts - - Add feature to pass options to terraform-docs. - -commit fbdd40ac8f8ebbcaecc1f90e762de753b1aab79c -Author: Martin Etmajer -Date: Tue Nov 13 12:30:06 2018 +0100 - - Add feature to pass options to terraform-docs. - -commit b7c50947b0f3968172a9c5a4df2ad3bb203dca22 -Author: Anton Babenko -Date: Tue Jul 10 11:28:43 2018 +0200 - - Added license file (fixed #21) - -commit 8dd603be09855246e7622681e609c1e4dc5513d3 -Author: Anton Babenko -Date: Thu May 24 22:12:04 2018 +0200 - - Updated README - -commit 69039c3a8cadd12435040a2161fde0453de7b69a -Author: Robin Bowes -Date: Thu May 24 21:10:49 2018 +0100 - - Only run validate if .tf files exist in the directory. (#20) - - * Only run validate if .tf files exist in the directory. - - * Same fix, different script :) - -commit 2d3782cefadb0941102fe413ab08a75905fcd081 -Author: jeremy avnet <162998+brainsik@users.noreply.github.com> -Date: Sun May 20 03:10:28 2018 -0700 - - Replace terraform_docs use of GNU sed with perl (#15) - - * Fix ShellCheck warning 2219 - - https://github.com/koalaman/shellcheck/wiki/SC2219 - - * Replace GNU sed commands with perl - - This replaces the sed commands which required GNU sed be installed with - perl versions. This should make this script more universally usable - (e.g., on macOS) without installing additional tools. - -commit 6b06683c0db2bcee7d9230f107855223c199bea8 -Author: jeremy avnet <162998+brainsik@users.noreply.github.com> -Date: Sun May 20 01:00:34 2018 -0700 - - Fixes use of md5 for tempfile name (#16) - -commit 091f8b15d7b458e5a0aca642483deb2205e7db02 -Author: Anton Babenko -Date: Wed May 16 21:58:40 2018 +0200 - - Run terraform_docs only if README.md is present - -commit 8e03aec3d5362eb511043c4be0bbc671de5c1ad1 -Author: Anton Babenko -Date: Wed May 16 21:57:49 2018 +0200 - - Run terraform_docs only if README.md is present - -commit 97a668640d21b76e5afa727bb5af005fe9501bcb -Author: Anton Babenko -Date: Wed May 16 20:04:48 2018 +0200 - - Added terraform-docs integration (#13) - - * Add hook to create readme - - * Updated README - -commit 41d4951aff03f70ac72908e78a7439ff0cb8ee71 -Author: Anton Babenko -Date: Sat Apr 21 11:22:47 2018 +0200 - - Allow to have spaces in directories (#11) - -commit e6267fd1508002ce35c91b76f2b13ce317a4e03d -Author: Anton Babenko -Date: Tue Mar 6 13:59:22 2018 +0100 - - Bump new version - -commit b0d43204ca5dd994dd0b9f2a4c793ff807cfc303 -Author: Anton Babenko -Date: Tue Mar 6 13:58:03 2018 +0100 - - Format tfvars files explicitely, because terraform fmt ignores them (#9) - -commit c6f81e3730aa1515cfbc4f5ab7aa2369afb186f0 -Author: Anton Babenko -Date: Wed Jan 24 15:46:37 2018 +0100 - - Updated readme - -commit b9a885160a1c7610a2ff7e40c408d24a1bb8f50f -Author: Anton Babenko -Date: Wed Jan 24 14:03:15 2018 +0100 - - Show failed path - -commit 93394c482adb12659113b1c09b856ec631db8bdb -Author: Anton Babenko -Date: Wed Jan 24 13:57:41 2018 +0100 - - Show failed path - -commit 97769abeb3fcf9191bee8b0bc43024d7a99edbff -Author: Anton Babenko -Date: Wed Jan 24 13:48:44 2018 +0100 - - Show failed path - -commit e220e169cab46dd7e2cdb6b258b311c69036a8e8 -Author: Anton Babenko -Date: Wed Jan 24 13:34:34 2018 +0100 - - Updated scripts - -commit 5f3ac96d4441b230c04e14161fdeb350dba7ad9c -Author: Anton Babenko -Date: Wed Jan 24 12:13:51 2018 +0100 - - Added scripts to validate terraform files - -commit 70b77dcf32a7096b03227edd375f01e6177d4f81 -Author: Anton Babenko -Date: Mon Jan 15 16:27:01 2018 +0100 - - Added badges - -commit bd50003bd773511e596c67984c144cc5774dac4c -Author: Anton Babenko -Date: Mon Jan 15 16:12:51 2018 +0100 - - Added formatting for tfvars (fixes #4) (#6) - -commit 37dfe9ab4bf3d8d5889246817f4233bdcea0efcf -Merge: 42cd6c4 4c7ea04 -Author: Anton Babenko -Date: Thu Jan 4 13:12:07 2018 +0100 - - Merge pull request #5 from schneems/schneems/codetriage-badge - - [ci skip] Get more Open Source Helpers - -commit 4c7ea0417dd2ffcf97264a1c76362c4791dabe6c -Author: schneems -Date: Wed Jan 3 22:26:39 2018 -0600 - - [ci skip] Get more Open Source Helpers - - [CodeTriage](https://www.codetriage.com/) is an app I have maintained - for the past 4-5 years with the goal of getting people involved in - Open Source projects like this one. The app sends subscribers a random - open issue for them to help "triage". For some languages you can also - suggested areas to add documentation. - - The initial approach was inspired by seeing the work of the small - core team spending countless hours asking "what version was - this in" and "can you give us an example app". The idea is to - outsource these small interactions to a huge team of volunteers - and let the core team focus on their work. - - I want to add a badge to the README of this project. The idea is to - provide an easy link for people to get started contributing to this - project. A badge indicates the number of people currently subscribed - to help the repo. The color is based off of open issues in the project. - - Here are some examples of other projects that have a badge in their - README: - - - https://github.com/crystal-lang/crystal - - https://github.com/rails/rails - - https://github.com/codetriage/codetriage - - Thanks for building open source software, I would love to help you find some helpers. - -commit 42cd6c44f6867d354648915a541080c625a6c311 -Author: Anton Babenko -Date: Thu Jun 8 11:02:21 2017 +0200 - - Renamed shell script file to the correct one - -commit 837203f7b80a7ab0069cbaee80850a85325bdf02 -Author: Anton Babenko -Date: Thu Jun 8 10:31:58 2017 +0200 - - Updated .pre-commit-hooks.yaml - -commit 2a81bb52c804a0694ee7529fc7d577b46eb9ddec -Author: Anton Babenko -Date: Thu Jun 8 10:30:39 2017 +0200 - - Updated sha in README - -commit ebced21e6deee9f8f2cbd2a20ed22bfb26d71d02 -Merge: b50c154 f99b7dd -Author: Anton Babenko -Date: Thu Jun 8 10:28:52 2017 +0200 - - Merge pull request #3 from pecigonzalo/master - - Exclude .terraform even on subfolders - -commit f99b7dd61c68322f1a7299b408532013afdccecf -Author: Gonzalo Peci -Date: Wed Mar 29 17:08:02 2017 +0200 - - Exclude .terraform even on subfolders - -commit b50c154638d10aef306b3c5538b1813bb3c70064 -Author: Anton Babenko -Date: Wed Jan 25 10:28:51 2017 +0100 - - Copied to .pre-commit-hooks.yaml for compatibility (closes #1) - -commit 67dcb8615ff462786c211117b7dd52fd43493e75 -Author: Anton Babenko -Date: Tue Sep 27 21:47:08 2016 +0200 - - Updated README - -commit 587d4420a575e3d256ba3d36f641e1c462ff79a1 -Author: Anton Babenko -Date: Tue Sep 27 20:01:11 2016 +0200 - - Ready, probably :) - -commit 8c2226857e61d789f01a02fb96feaaadb7c20d6b -Author: Anton Babenko -Date: Tue Sep 27 19:47:26 2016 +0200 - - Initial commit - -commit f454b08495c58b96dfd5fddf5ac470660f4061e1 -Author: Anton Babenko -Date: Tue Sep 27 19:37:42 2016 +0200 - - Initial commit From 632bccd8723e36f481932e0a9780137d76ebd8e0 Mon Sep 17 00:00:00 2001 From: Maksym Vlasov Date: Thu, 24 Nov 2022 18:47:34 +0200 Subject: [PATCH 36/43] Update hooks/_common.sh --- hooks/_common.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/hooks/_common.sh b/hooks/_common.sh index 84787a072..6bc867965 100644 --- a/hooks/_common.sh +++ b/hooks/_common.sh @@ -307,7 +307,6 @@ function common::terraform_init { common::colorify "red" "'terraform init' failed, '$command_name' skipped: $dir_path" echo -e "$init_output\n\n" else - common::colorify "green" "Command 'terraform init' successfully done: $dir_path" fi fi From 955cb58441969374fab0dda5f4d6277f1f9536be Mon Sep 17 00:00:00 2001 From: Maksym Vlasov Date: Thu, 24 Nov 2022 18:51:54 +0200 Subject: [PATCH 37/43] Apply suggestions from code review --- hooks/terraform_validate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hooks/terraform_validate.sh b/hooks/terraform_validate.sh index 9c9ef13ae..1ff72156b 100755 --- a/hooks/terraform_validate.sh +++ b/hooks/terraform_validate.sh @@ -25,7 +25,7 @@ function main { } ####################################################################### -# Run `terraform validate` and handle errors. Requires `jq`` +# Run `terraform validate` and handle errors. Requires `jq` # Arguments: # validate_output (string with json) output of `terraform validate` command # Outputs: From 29086b84ea45545aca7a5627ee59d7f63a9f6f59 Mon Sep 17 00:00:00 2001 From: Bjorn Olsen Date: Fri, 25 Nov 2022 10:55:00 +0200 Subject: [PATCH 38/43] Fixups --- hooks/terraform_validate.sh | 59 +++++++++++++++++++++---------------- 1 file changed, 34 insertions(+), 25 deletions(-) diff --git a/hooks/terraform_validate.sh b/hooks/terraform_validate.sh index 1ff72156b..f1612b8eb 100755 --- a/hooks/terraform_validate.sh +++ b/hooks/terraform_validate.sh @@ -25,13 +25,16 @@ function main { } ####################################################################### -# Run `terraform validate` and handle errors. Requires `jq` +# Run `terraform validate` and match errors. Requires `jq` # Arguments: # validate_output (string with json) output of `terraform validate` command # Outputs: -# Returns "boolean" - 1 (true, have errors), 0 (false, no errors) +# Returns integer: +# - 0 (no errors) +# - 1 (matched errors; retry) +# - 2 (no matched errors; do not retry) ####################################################################### -function find_validate_errors { +function match_validate_errors { local validate_output=$1 local valid @@ -43,7 +46,7 @@ function find_validate_errors { return 0 fi - # Parse error message. + # Parse error message for retry-able errors. while IFS= read -r error_message; do summary=$(jq -rc '.summary' <<< "$error_message") case $summary in @@ -55,7 +58,7 @@ function find_validate_errors { esac done < <(jq -rc '.diagnostics[]' <<< "$validate_output") - return 0 + return 2 # Some other error; dont retry } ####################################################################### @@ -102,34 +105,40 @@ function per_dir_hook_unique_part { return $exit_code } - if [ "$retry_once_with_cleanup" == "true" ]; then + if [ "$retry_once_with_cleanup" != "true" ]; then + # terraform validate only + validate_output=$(terraform validate "${args[@]}" 2>&1) + exit_code=$? + else + # terraform validate, plus capture possible errors validate_output=$(terraform validate -json "${args[@]}" 2>&1) + exit_code=$? - local -i validate_have_errors - find_validate_errors "$validate_output" - validate_have_errors=$? + # Match specific validation errors + local -i validate_errors_matched + match_validate_errors "$validate_output" + validate_errors_matched=$? - if [ "$validate_have_errors" = "0" ]; then - return 0 - fi + # Errors matched; Retry validation + if [ "$validate_errors_matched" = "1" ]; then + common::colorify "yellow" "Validation failed. Removing cached providers and modules from $dir_path/.terraform" + # `.terraform` dir may comprise some extra files, like `environment` + # which stores info about current TF workspace, so we can't just remove + # `.terraform` dir completely. + rm -rf .terraform/{modules,providers}/ - common::colorify "yellow" "Validation failed. Removing cached providers and modules from $dir_path/.terraform" - # `.terraform` dir may comprise some extra files, like `environment` - # which stores info about current TF workspace, so we can't just remove - # `.terraform` dir completely. - rm -rf .terraform/{modules,providers}/ + common::colorify "yellow" "Re-validating: $dir_path" - common::terraform_init 'terraform validate' "$dir_path" || { - exit_code=$? - return $exit_code - } + common::terraform_init 'terraform validate' "$dir_path" || { + exit_code=$? + return $exit_code + } - common::colorify "yellow" "Re-validating: $dir_path" + validate_output=$(terraform validate "${args[@]}" 2>&1) + exit_code=$? + fi fi - validate_output=$(terraform validate "${args[@]}" 2>&1) - exit_code=$? - if [ $exit_code -ne 0 ]; then common::colorify "red" "Validation failed: $dir_path" echo -e "$validate_output\n\n" From 537c49f23751a3f627f2c14a22d8ba6e21b68e49 Mon Sep 17 00:00:00 2001 From: MaxymVlasov Date: Fri, 25 Nov 2022 13:14:07 +0200 Subject: [PATCH 39/43] Minor language fix --- hooks/terraform_validate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hooks/terraform_validate.sh b/hooks/terraform_validate.sh index f1612b8eb..6d048d032 100755 --- a/hooks/terraform_validate.sh +++ b/hooks/terraform_validate.sh @@ -58,7 +58,7 @@ function match_validate_errors { esac done < <(jq -rc '.diagnostics[]' <<< "$validate_output") - return 2 # Some other error; dont retry + return 2 # Some other error; don't retry } ####################################################################### From b52b475053c8b57d618aa6ce5758ec5919f95963 Mon Sep 17 00:00:00 2001 From: Maksym Vlasov Date: Fri, 25 Nov 2022 19:37:52 +0200 Subject: [PATCH 40/43] Apply suggestions from code review Co-authored-by: George L. Yermulnik --- README.md | 13 +++++++------ hooks/terraform_validate.sh | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index d40797a90..8aad4b9c2 100644 --- a/README.md +++ b/README.md @@ -663,14 +663,15 @@ Example: - --hook-config=--retry-once-with-cleanup=true # Boolean. true or false ``` - > Note: That flag require additional installed dependency: `jq`. + > Note: The flag requires additional dependency to be installed: `jq`. If `--retry-once-with-cleanup=true`, then in each failed directory the cached modules and providers from the `.terraform` directory will be deleted, before retrying once more. To avoid unnecessary deletion of this directory, the cleanup and retry will only happen if Terraform produces any of the following error messages: - * Missing or corrupted provider plugins - * Module source has changed - * Module version requirements have changed - * Module not installed + * "Missing or corrupted provider plugins" + * "Module source has changed" + * "Module version requirements have changed" + * "Module not installed" + * "Could not load plugin" **Warning:** When using `--retry-once-with-cleanup=true`, problematic `.terraform/modules/` and `.terraform/providers/` directories will be recursively deleted without prompting for consent. Other files and directories will not be affected, such as the `.terraform/environment` file. @@ -690,7 +691,7 @@ Example: `terraform_validate` hook will try to reinitialize them before running the `terraform validate` command. - **Warning:** If you use Terraform workspaces, DO NOT use this option ([details](https://github.com/antonbabenko/pre-commit-terraform/issues/203#issuecomment-918791847)). Consider the first option, or wait to [`force-init`](https://github.com/antonbabenko/pre-commit-terraform/issues/224) option implementation. + **Warning:** If you use Terraform workspaces, DO NOT use this option ([details](https://github.com/antonbabenko/pre-commit-terraform/issues/203#issuecomment-918791847)). Consider the first option, or wait for [`force-init`](https://github.com/antonbabenko/pre-commit-terraform/issues/224) option implementation. 4. `terraform_validate` in a repo with Terraform module, written using Terraform 0.15+ and which uses provider `configuration_aliases` ([Provider Aliases Within Modules](https://www.terraform.io/language/modules/develop/providers#provider-aliases-within-modules)), errors out. diff --git a/hooks/terraform_validate.sh b/hooks/terraform_validate.sh index 6d048d032..37eee6262 100755 --- a/hooks/terraform_validate.sh +++ b/hooks/terraform_validate.sh @@ -120,8 +120,8 @@ function per_dir_hook_unique_part { validate_errors_matched=$? # Errors matched; Retry validation - if [ "$validate_errors_matched" = "1" ]; then - common::colorify "yellow" "Validation failed. Removing cached providers and modules from $dir_path/.terraform" + if [ "$validate_errors_matched" -eq 1 ]; then + common::colorify "yellow" "Validation failed. Removing cached providers and modules from \"$dir_path/.terraform\" directory" # `.terraform` dir may comprise some extra files, like `environment` # which stores info about current TF workspace, so we can't just remove # `.terraform` dir completely. From 4464e13e55889a4de717c6c8a39a833fa268f58c Mon Sep 17 00:00:00 2001 From: Maksym Vlasov Date: Fri, 25 Nov 2022 19:59:54 +0200 Subject: [PATCH 41/43] Stop execution if more than one flag specified --- hooks/terraform_validate.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hooks/terraform_validate.sh b/hooks/terraform_validate.sh index 37eee6262..869de7f93 100755 --- a/hooks/terraform_validate.sh +++ b/hooks/terraform_validate.sh @@ -95,6 +95,10 @@ function per_dir_hook_unique_part { case $key in --retry-once-with-cleanup) + if [ $retry_once_with_cleanup ]; then + common::colorify "yellow" 'Invalid hook config. Make sure that you specify not more than one "--retry-once-with-cleanup" flag' + exit 1 + fi retry_once_with_cleanup=$value ;; esac From 3a129496dfd79d899e908a4911bc0e4aa1c78aa8 Mon Sep 17 00:00:00 2001 From: MaxymVlasov Date: Fri, 25 Nov 2022 20:01:22 +0200 Subject: [PATCH 42/43] Revert "Stop execution if more than one flag specified" This reverts commit 4464e13e55889a4de717c6c8a39a833fa268f58c. --- hooks/terraform_validate.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/hooks/terraform_validate.sh b/hooks/terraform_validate.sh index 869de7f93..37eee6262 100755 --- a/hooks/terraform_validate.sh +++ b/hooks/terraform_validate.sh @@ -95,10 +95,6 @@ function per_dir_hook_unique_part { case $key in --retry-once-with-cleanup) - if [ $retry_once_with_cleanup ]; then - common::colorify "yellow" 'Invalid hook config. Make sure that you specify not more than one "--retry-once-with-cleanup" flag' - exit 1 - fi retry_once_with_cleanup=$value ;; esac From b15168df29304f1020a0e0e2fba04cd9e32a7f8c Mon Sep 17 00:00:00 2001 From: Maksym Vlasov Date: Fri, 25 Nov 2022 20:16:29 +0200 Subject: [PATCH 43/43] Stop execution if more than one flag specified --- hooks/terraform_validate.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hooks/terraform_validate.sh b/hooks/terraform_validate.sh index 37eee6262..3e4694855 100755 --- a/hooks/terraform_validate.sh +++ b/hooks/terraform_validate.sh @@ -83,7 +83,7 @@ function per_dir_hook_unique_part { # # Get hook settings # - local retry_once_with_cleanup=false + local retry_once_with_cleanup IFS=";" read -r -a configs <<< "${HOOK_CONFIG[*]}" @@ -95,6 +95,10 @@ function per_dir_hook_unique_part { case $key in --retry-once-with-cleanup) + if [ $retry_once_with_cleanup ]; then + common::colorify "yellow" 'Invalid hook config. Make sure that you specify not more than one "--retry-once-with-cleanup" flag' + exit 1 + fi retry_once_with_cleanup=$value ;; esac