Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 40 additions & 15 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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"
Empty file added .trivyignore
Empty file.
4 changes: 2 additions & 2 deletions examples/multiple-containers/mock_provider.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
terraform {
required_version = ">= 0.13"
required_version = ">= 1.5.5"
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 4"
version = "~>6"
}
}
}
Expand Down
Empty file.
Empty file.
4 changes: 2 additions & 2 deletions examples/test/mock_provider.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
terraform {
required_version = ">= 0.13"
required_version = ">= 1.5.5"
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 4"
version = "~>6"
}
}
}
Expand Down
Empty file added examples/test/outputs.tf
Empty file.
Empty file added examples/test/variables.tf
Empty file.
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
terraform {
required_version = ">= 0.13"
required_version = ">= 1.5.5"
required_providers {
aws = {
source = "hashicorp/aws"
Expand Down