diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b58d598..fba7450 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,21 +1,46 @@ -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_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/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/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/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 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"