Files
terraform-prowlarr/modules/prowlarr/main.tf
T
unkinben a59646c44a
ci/woodpecker/pr/plan Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline failed
fix: use nested attribute assignment instead of dynamic blocks
The prowlarr provider uses nested attributes for fields and categories,
not HCL blocks. Assign them directly as values.
2026-06-28 22:27:57 +10:00

32 lines
1.1 KiB
Terraform

resource "prowlarr_tag" "this" {
for_each = var.tags
label = each.value.label
}
resource "prowlarr_indexer" "this" {
for_each = var.indexers
name = each.key
enable = lookup(each.value, "enable", true)
app_profile_id = each.value.app_profile_id
implementation = each.value.implementation
config_contract = each.value.config_contract
protocol = each.value.protocol
tags = lookup(each.value, "tags", [])
fields = each.value.fields
}
resource "prowlarr_download_client_nzbget" "this" {
for_each = var.download_clients
name = each.key
enable = lookup(each.value, "enable", true)
priority = lookup(each.value, "priority", 1)
host = each.value.host
port = each.value.port
use_ssl = lookup(each.value, "use_ssl", false)
username = lookup(each.value, "username", "")
password = lookup(each.value, "password", "")
category = lookup(each.value, "category", "")
tags = lookup(each.value, "tags", [])
categories = lookup(each.value, "categories", [])
}