fix: align config with imported state for zero-drift plan
This commit is contained in:
+25
-12
@@ -6,14 +6,15 @@ resource "radarr_custom_format" "this" {
|
||||
}
|
||||
|
||||
resource "radarr_quality_profile" "this" {
|
||||
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)
|
||||
quality_groups = each.value.quality_groups
|
||||
language = each.value.language
|
||||
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)
|
||||
quality_groups = each.value.quality_groups
|
||||
language = each.value.language
|
||||
|
||||
format_items = [
|
||||
for fi in lookup(each.value, "format_items", []) : {
|
||||
@@ -26,7 +27,7 @@ resource "radarr_quality_profile" "this" {
|
||||
|
||||
resource "radarr_download_client_nzbget" "this" {
|
||||
for_each = var.download_clients
|
||||
name = each.key
|
||||
name = lookup(each.value, "name", each.key)
|
||||
enable = lookup(each.value, "enable", true)
|
||||
priority = lookup(each.value, "priority", 1)
|
||||
host = each.value.host
|
||||
@@ -37,11 +38,15 @@ resource "radarr_download_client_nzbget" "this" {
|
||||
movie_category = lookup(each.value, "movie_category", "")
|
||||
remove_completed_downloads = lookup(each.value, "remove_completed_downloads", true)
|
||||
remove_failed_downloads = lookup(each.value, "remove_failed_downloads", true)
|
||||
|
||||
lifecycle {
|
||||
ignore_changes = [password]
|
||||
}
|
||||
}
|
||||
|
||||
resource "radarr_indexer_newznab" "this" {
|
||||
for_each = var.indexers
|
||||
name = each.key
|
||||
name = lookup(each.value, "name", each.key)
|
||||
enable_automatic_search = lookup(each.value, "enable_automatic_search", true)
|
||||
enable_interactive_search = lookup(each.value, "enable_interactive_search", true)
|
||||
enable_rss = lookup(each.value, "enable_rss", true)
|
||||
@@ -50,15 +55,19 @@ resource "radarr_indexer_newznab" "this" {
|
||||
api_path = lookup(each.value, "api_path", "/api")
|
||||
api_key = lookup(each.value, "api_key", "")
|
||||
categories = lookup(each.value, "categories", [])
|
||||
|
||||
lifecycle {
|
||||
ignore_changes = [api_key]
|
||||
}
|
||||
}
|
||||
|
||||
resource "radarr_notification_emby" "this" {
|
||||
for_each = var.notifications
|
||||
name = each.key
|
||||
name = lookup(each.value, "name", each.key)
|
||||
host = each.value.host
|
||||
port = each.value.port
|
||||
use_ssl = lookup(each.value, "use_ssl", false)
|
||||
api_key = each.value.api_key
|
||||
api_key = lookup(each.value, "api_key", "")
|
||||
notify = lookup(each.value, "notify", false)
|
||||
update_library = lookup(each.value, "update_library", true)
|
||||
|
||||
@@ -70,6 +79,10 @@ resource "radarr_notification_emby" "this" {
|
||||
on_movie_file_delete = lookup(each.value, "on_movie_file_delete", true)
|
||||
on_movie_file_delete_for_upgrade = lookup(each.value, "on_movie_file_delete_for_upgrade", true)
|
||||
on_application_update = lookup(each.value, "on_application_update", true)
|
||||
|
||||
lifecycle {
|
||||
ignore_changes = [api_key]
|
||||
}
|
||||
}
|
||||
|
||||
resource "radarr_delay_profile" "this" {
|
||||
|
||||
Reference in New Issue
Block a user