From f33c592b954f6557af5e0dcd87ff0a330bbe52c9 Mon Sep 17 00:00:00 2001 From: Kacper Muda Date: Mon, 16 Oct 2023 14:03:14 +0200 Subject: [PATCH] docs: Add comments about versions of tflint and pre-commit repo --- .github/workflows/pre-commit.yml | 4 ++++ .pre-commit-config.yaml | 8 +++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index dd04c49..831a570 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -11,3 +11,7 @@ on: jobs: main: uses: getindata/github-workflows/.github/workflows/tf-pre-commit.yml@v0.3.1 + with: + # tflint v0.46.0 is the latest version we can use with pre-commit v0.1.20 + # See .pre-commit-config.yaml for more details. + tflint-version: v0.46.0 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 177b998..7e759f2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,8 +1,10 @@ repos: - repo: https://github.com/gruntwork-io/pre-commit - rev: "v0.1.22" # Get the latest from: https://github.com/gruntwork-io/pre-commit/releases + # Stick to v0.1.20 until this bug is fixed: https://github.com/gruntwork-io/pre-commit/issues/102 + # When updating, also check if tflint version in pre-commit workflow can be updated. + rev: "v0.1.20" # Get the latest from: https://github.com/gruntwork-io/pre-commit/releases hooks: - - id: terraform-validate # It should be before tflint hook as it runs terraform init required by tflint + - id: terraform-validate # It should be the first step as it runs terraform init required by tflint - id: terraform-fmt - id: tflint args: @@ -16,7 +18,7 @@ repos: args: ["."] - repo: https://github.com/bridgecrewio/checkov.git - rev: "2.5.6" # Get the latest from: https://github.com/bridgecrewio/checkov/releases + rev: "2.5.9" # Get the latest from: https://github.com/bridgecrewio/checkov/releases hooks: - id: checkov args: [--skip-check, "CKV_TF_1"] # Terraform module sources do not use a git url with a commit hash revision