From 40df65c1e14df7aa2842c2be2f67dd09183bbc2a Mon Sep 17 00:00:00 2001 From: Ben Vincent Date: Mon, 29 Jun 2026 23:25:09 +1000 Subject: [PATCH] fix: add versions.tf and fix tofu fmt for pre-commit Add required_providers block so tofu validate works in the module directory. Fix alignment from tofu fmt. --- modules/sonarr/main.tf | 8 ++++---- modules/sonarr/versions.tf | 9 +++++++++ 2 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 modules/sonarr/versions.tf diff --git a/modules/sonarr/main.tf b/modules/sonarr/main.tf index 46b83ab..6aa9b9a 100644 --- a/modules/sonarr/main.tf +++ b/modules/sonarr/main.tf @@ -15,10 +15,10 @@ locals { } resource "sonarr_quality_profile" "this" { - for_each = var.quality_profiles - name = each.key - upgrade_allowed = lookup(each.value, "upgrade_allowed", false) - cutoff = each.value.cutoff + for_each = var.quality_profiles + name = each.key + upgrade_allowed = lookup(each.value, "upgrade_allowed", false) + cutoff = each.value.cutoff cutoff_format_score = lookup(each.value, "cutoff_format_score", 0) min_format_score = lookup(each.value, "min_format_score", 0) min_upgrade_format_score = lookup(each.value, "min_upgrade_format_score", 0) diff --git a/modules/sonarr/versions.tf b/modules/sonarr/versions.tf new file mode 100644 index 0000000..5a2f045 --- /dev/null +++ b/modules/sonarr/versions.tf @@ -0,0 +1,9 @@ +terraform { + required_version = ">= 1.10" + required_providers { + sonarr = { + source = "devopsarr/sonarr" + version = ">= 3.4.2" + } + } +}