From 7261bf5bbba039649b2a6ea5a161debd7c0a4e9b Mon Sep 17 00:00:00 2001 From: Ben Vincent Date: Mon, 29 Jun 2026 23:29:28 +1000 Subject: [PATCH] fix: remove versions.tf and exclude modules from validate/tflint The versions.tf conflicts with terragrunt's generated backend.tf which already has required_providers. Exclude modules/ from tofu-validate and tflint pre-commit hooks since they can't init without the full terragrunt context. --- .pre-commit-config.yaml | 2 ++ modules/sonarr/versions.tf | 9 --------- 2 files changed, 2 insertions(+), 9 deletions(-) delete mode 100644 modules/sonarr/versions.tf diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 646cd65..03d83e2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,7 +11,9 @@ repos: hooks: - id: tofu-fmt - id: tofu-validate + exclude: ^modules/ - id: tflint + exclude: ^modules/ - id: terragrunt-hcl-fmt - repo: https://github.com/adrienverge/yamllint.git rev: v1.37.1 diff --git a/modules/sonarr/versions.tf b/modules/sonarr/versions.tf deleted file mode 100644 index 5a2f045..0000000 --- a/modules/sonarr/versions.tf +++ /dev/null @@ -1,9 +0,0 @@ -terraform { - required_version = ">= 1.10" - required_providers { - sonarr = { - source = "devopsarr/sonarr" - version = ">= 3.4.2" - } - } -}