diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3049ea6b..22637f9f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -64,3 +64,9 @@ repos: rev: "v1.77.0" hooks: - id: terraform_fmt + - id: terraform_validate + args: + - --tf-init-args=-backend=false + - --tf-init-args=-lock=false + - --tf-init-args=-upgrade + - --hook-config=--retry-once-with-cleanup=true diff --git a/{{cookiecutter.project_dirname}}/.pre-commit-config.yaml b/{{cookiecutter.project_dirname}}/.pre-commit-config.yaml index 4543e9bd..c6c7c4f3 100644 --- a/{{cookiecutter.project_dirname}}/.pre-commit-config.yaml +++ b/{{cookiecutter.project_dirname}}/.pre-commit-config.yaml @@ -19,6 +19,12 @@ repos: rev: "v1.77.0" hooks: - id: terraform_fmt + - id: terraform_validate + args: + - --tf-init-args=-backend=false + - --tf-init-args=-lock=false + - --tf-init-args=-upgrade + - --hook-config=--retry-once-with-cleanup=true - repo: https://github.com/pre-commit/mirrors-prettier rev: "v3.0.0-alpha.4" hooks: