From 7fdf387127160f789fe77d42a3ae32c72fbcc3e0 Mon Sep 17 00:00:00 2001 From: saikrishnama <> Date: Mon, 15 Apr 2024 15:38:20 -0400 Subject: [PATCH] update tflint patren --- .pre-commit-config.yaml | 31 ++++++++++++++++--------------- .tflint.hcl | 25 +++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 15 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3cfeb3d..bd146da 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,21 +9,22 @@ repos: - '--args=--config=.terraform-docs.yml' - id: terraform_tflint args: - - '--args=--only=terraform_deprecated_index' - - '--args=--only=terraform_deprecated_interpolation' - - '--args=--only=terraform_deprecated_index' - - '--args=--only=terraform_unused_declarations' - - '--args=--only=terraform_comment_syntax' - - '--args=--only=terraform_documented_outputs' - - '--args=--only=terraform_documented_variables' - - '--args=--only=terraform_typed_variables' - - '--args=--only=terraform_module_pinned_source' - - '--args=--only=terraform_naming_convention' - - '--args=--only=terraform_required_version' - - '--args=--only=terraform_required_providers' - - '--args=--only=terraform_standard_module_structure' - - '--args=--only=terraform_workspace_remote' - - '--args=--only=terraform_unused_required_providers' + - --args=--config=__GIT_WORKING_DIR__/.tflint.hcl + # - '--args=--only=terraform_deprecated_index' + # - '--args=--only=terraform_deprecated_interpolation' + # - '--args=--only=terraform_deprecated_index' + # - '--args=--only=terraform_unused_declarations' + # - '--args=--only=terraform_comment_syntax' + # - '--args=--only=terraform_documented_outputs' + # - '--args=--only=terraform_documented_variables' + # - '--args=--only=terraform_typed_variables' + # - '--args=--only=terraform_module_pinned_source' + # - '--args=--only=terraform_naming_convention' + # - '--args=--only=terraform_required_version' + # - '--args=--only=terraform_required_providers' + # - '--args=--only=terraform_standard_module_structure' + # - '--args=--only=terraform_workspace_remote' + # - '--args=--only=terraform_unused_required_providers' - id: terraform_validate exclude: examples - repo: https://github.com/pre-commit/pre-commit-hooks diff --git a/.tflint.hcl b/.tflint.hcl index 26c436d..7aaa52b 100644 --- a/.tflint.hcl +++ b/.tflint.hcl @@ -64,3 +64,28 @@ rule "terraform_standard_module_structure" { rule "terraform_workspace_remote" { enabled = true } + + +config { + format = "compact" + module = false + force = false +} + +# Enable all rules, always. The bundled plugin uses only recommended. +// plugin "terraform" { +// enabled = true +// preset = "all" +// } + +// # Enforces module version pinning. +// rule "terraform_module_pinned_source" { +// enabled = true +// style = "semver" +// } + +// # Enforces naming conventions. +// rule "terraform_naming_convention" { +// enabled = true +// format = "snake_case" +// }