From e81b4ee327cc486495a57ef2596f977d7bb4a1eb Mon Sep 17 00:00:00 2001 From: Julian Nonino Date: Thu, 11 Dec 2025 12:05:22 +0000 Subject: [PATCH 1/2] Module maintenance --- .pre-commit-config.yaml | 56 ++++++++++++++----- .trivyignore | 0 examples/multiple-containers/mock_provider.tf | 4 +- examples/test/mock_provider.tf | 4 +- versions.tf | 2 +- 5 files changed, 46 insertions(+), 20 deletions(-) create mode 100644 .trivyignore diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b58d598..e3e297e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,21 +1,47 @@ -fail_fast: true - repos: - - repo: https://github.com/antonbabenko/pre-commit-terraform - rev: v1.77.1 # Get the latest from: https://github.com/antonbabenko/pre-commit-terraform/releases - hooks: - - id: terraform_fmt - - id: terraform_docs - args: ["--args=--lockfile=false"] - - id: terraform_validate - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 # Get the latest from: https://github.com/pre-commit/pre-commit-hooks/releases + rev: v6.0.0 hooks: - - id: check-merge-conflict - - id: end-of-file-fixer - - id: trailing-whitespace - id: check-added-large-files - id: check-case-conflict - - id: detect-private-key + - id: check-executables-have-shebangs + - id: check-illegal-windows-names + - id: check-json + - id: check-merge-conflict + - id: check-shebang-scripts-are-executable + - id: check-symlinks - id: check-yaml - files: ^(.github/workflows).*$ + - id: detect-private-key + - id: end-of-file-fixer + - id: pretty-format-json + - id: trailing-whitespace + args: [--markdown-linebreak-ext=md] + - repo: https://github.com/antonbabenko/pre-commit-terraform + rev: v1.104.0 + hooks: + - id: terraform_docs + - id: terraform_fmt + - id: terraform_tflint + args: + - '--args=--only=terraform_comment_syntax' + - '--args=--only=terraform_deprecated_index' + - '--args=--only=terraform_deprecated_interpolation' + - '--args=--only=terraform_deprecated_lookup' + - '--args=--only=terraform_documented_outputs' + - '--args=--only=terraform_documented_variables' + - '--args=--only=terraform_empty_list_equality' + - '--args=--only=terraform_json_syntax' + - '--args=--only=terraform_map_duplicate_keys' + - '--args=--only=terraform_module_pinned_source' + - '--args=--only=terraform_module_shallow_clone' + - '--args=--only=terraform_module_version' + - '--args=--only=terraform_required_version' + - '--args=--only=terraform_standard_module_structure' + - '--args=--only=terraform_typed_variables' + - '--args=--only=terraform_unused_declarations' + - '--args=--only=terraform_unused_required_providers' + - '--args=--only=terraform_workspace_remote' + - id: terraform_validate + - id: terraform_trivy + args: + - --args=--skip-dirs="**/.terraform" diff --git a/.trivyignore b/.trivyignore new file mode 100644 index 0000000..e69de29 diff --git a/examples/multiple-containers/mock_provider.tf b/examples/multiple-containers/mock_provider.tf index bcc022c..1296a8b 100644 --- a/examples/multiple-containers/mock_provider.tf +++ b/examples/multiple-containers/mock_provider.tf @@ -1,9 +1,9 @@ terraform { - required_version = ">= 0.13" + required_version = ">= 1.5.5" required_providers { aws = { source = "hashicorp/aws" - version = ">= 4" + version = "~>6" } } } diff --git a/examples/test/mock_provider.tf b/examples/test/mock_provider.tf index bcc022c..1296a8b 100644 --- a/examples/test/mock_provider.tf +++ b/examples/test/mock_provider.tf @@ -1,9 +1,9 @@ terraform { - required_version = ">= 0.13" + required_version = ">= 1.5.5" required_providers { aws = { source = "hashicorp/aws" - version = ">= 4" + version = "~>6" } } } diff --git a/versions.tf b/versions.tf index 56f700b..69bc5f7 100644 --- a/versions.tf +++ b/versions.tf @@ -1,5 +1,5 @@ terraform { - required_version = ">= 0.13" + required_version = ">= 1.5.5" required_providers { aws = { source = "hashicorp/aws" From ff2057166b0c1722ca39f15d90f6c47ecc3b486a Mon Sep 17 00:00:00 2001 From: Julian Nonino Date: Thu, 11 Dec 2025 12:52:12 +0000 Subject: [PATCH 2/2] Update pre-commit hooks --- .pre-commit-config.yaml | 1 - examples/multiple-containers/outputs.tf | 0 examples/multiple-containers/variables.tf | 0 examples/test/outputs.tf | 0 examples/test/variables.tf | 0 5 files changed, 1 deletion(-) create mode 100644 examples/multiple-containers/outputs.tf create mode 100644 examples/multiple-containers/variables.tf create mode 100644 examples/test/outputs.tf create mode 100644 examples/test/variables.tf diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e3e297e..fba7450 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -30,7 +30,6 @@ repos: - '--args=--only=terraform_documented_outputs' - '--args=--only=terraform_documented_variables' - '--args=--only=terraform_empty_list_equality' - - '--args=--only=terraform_json_syntax' - '--args=--only=terraform_map_duplicate_keys' - '--args=--only=terraform_module_pinned_source' - '--args=--only=terraform_module_shallow_clone' diff --git a/examples/multiple-containers/outputs.tf b/examples/multiple-containers/outputs.tf new file mode 100644 index 0000000..e69de29 diff --git a/examples/multiple-containers/variables.tf b/examples/multiple-containers/variables.tf new file mode 100644 index 0000000..e69de29 diff --git a/examples/test/outputs.tf b/examples/test/outputs.tf new file mode 100644 index 0000000..e69de29 diff --git a/examples/test/variables.tf b/examples/test/variables.tf new file mode 100644 index 0000000..e69de29