fix: align config with imported state for zero-drift plan
Reorder quality_groups to match provider state (highest quality first), use correct group structure (omit id/name for single-quality entries), add lifecycle ignore_changes for sensitive fields (api_key, password), support explicit name override via YAML for display name mismatches, and add min_upgrade_format_score attribute.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
name: "NZBgeek (Prowlarr)"
|
||||
enable_automatic_search: true
|
||||
enable_interactive_search: true
|
||||
enable_rss: true
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
name: "Emby / Jellyfin"
|
||||
host: jellyfin.service.consul
|
||||
port: 443
|
||||
use_ssl: true
|
||||
|
||||
@@ -3,54 +3,48 @@ cutoff: 7
|
||||
cutoff_format_score: 5000
|
||||
min_format_score: 0
|
||||
quality_groups:
|
||||
- id: 4
|
||||
qualities:
|
||||
- id: 4
|
||||
name: HDTV-720p
|
||||
source: television
|
||||
resolution: 720
|
||||
- id: 9
|
||||
qualities:
|
||||
- id: 9
|
||||
name: HDTV-1080p
|
||||
source: television
|
||||
resolution: 1080
|
||||
- id: 14
|
||||
qualities:
|
||||
- id: 14
|
||||
name: WEBRip-720p
|
||||
source: webRip
|
||||
resolution: 720
|
||||
- id: 5
|
||||
qualities:
|
||||
- id: 5
|
||||
name: WEBDL-720p
|
||||
source: web
|
||||
resolution: 720
|
||||
- id: 6
|
||||
qualities:
|
||||
- id: 6
|
||||
name: Bluray-720p
|
||||
- qualities:
|
||||
- id: 7
|
||||
name: Bluray-1080p
|
||||
source: bluray
|
||||
resolution: 720
|
||||
- id: 15
|
||||
resolution: 1080
|
||||
- id: 1002
|
||||
name: "WEB 1080p"
|
||||
qualities:
|
||||
- id: 15
|
||||
name: WEBRip-1080p
|
||||
source: webRip
|
||||
resolution: 1080
|
||||
- id: 3
|
||||
qualities:
|
||||
- id: 3
|
||||
name: WEBDL-1080p
|
||||
source: web
|
||||
resolution: 1080
|
||||
- id: 7
|
||||
qualities:
|
||||
- id: 7
|
||||
name: Bluray-1080p
|
||||
- qualities:
|
||||
- id: 6
|
||||
name: Bluray-720p
|
||||
source: bluray
|
||||
resolution: 720
|
||||
- id: 1001
|
||||
name: "WEB 720p"
|
||||
qualities:
|
||||
- id: 14
|
||||
name: WEBRip-720p
|
||||
source: webRip
|
||||
resolution: 720
|
||||
- id: 5
|
||||
name: WEBDL-720p
|
||||
source: web
|
||||
resolution: 720
|
||||
- qualities:
|
||||
- id: 9
|
||||
name: HDTV-1080p
|
||||
source: television
|
||||
resolution: 1080
|
||||
- qualities:
|
||||
- id: 4
|
||||
name: HDTV-720p
|
||||
source: television
|
||||
resolution: 720
|
||||
format_items:
|
||||
- name: release_AsmoFuscated
|
||||
format: release_AsmoFuscated
|
||||
|
||||
@@ -3,78 +3,69 @@ cutoff: 19
|
||||
cutoff_format_score: 5000
|
||||
min_format_score: 0
|
||||
quality_groups:
|
||||
- id: 4
|
||||
qualities:
|
||||
- id: 4
|
||||
name: HDTV-720p
|
||||
source: television
|
||||
resolution: 720
|
||||
- id: 9
|
||||
qualities:
|
||||
- id: 9
|
||||
name: HDTV-1080p
|
||||
source: television
|
||||
resolution: 1080
|
||||
- id: 14
|
||||
qualities:
|
||||
- id: 14
|
||||
name: WEBRip-720p
|
||||
source: webRip
|
||||
resolution: 720
|
||||
- id: 5
|
||||
qualities:
|
||||
- id: 5
|
||||
name: WEBDL-720p
|
||||
source: web
|
||||
resolution: 720
|
||||
- id: 6
|
||||
qualities:
|
||||
- id: 6
|
||||
name: Bluray-720p
|
||||
- qualities:
|
||||
- id: 19
|
||||
name: Bluray-2160p
|
||||
source: bluray
|
||||
resolution: 720
|
||||
- id: 15
|
||||
qualities:
|
||||
- id: 15
|
||||
name: WEBRip-1080p
|
||||
source: webRip
|
||||
resolution: 1080
|
||||
- id: 3
|
||||
qualities:
|
||||
- id: 3
|
||||
name: WEBDL-1080p
|
||||
source: web
|
||||
resolution: 1080
|
||||
- id: 7
|
||||
qualities:
|
||||
- id: 7
|
||||
name: Bluray-1080p
|
||||
source: bluray
|
||||
resolution: 1080
|
||||
- id: 16
|
||||
qualities:
|
||||
- id: 16
|
||||
name: HDTV-2160p
|
||||
source: television
|
||||
resolution: 2160
|
||||
- id: 17
|
||||
- id: 1003
|
||||
name: "WEB 2160p"
|
||||
qualities:
|
||||
- id: 17
|
||||
name: WEBRip-2160p
|
||||
source: webRip
|
||||
resolution: 2160
|
||||
- id: 18
|
||||
qualities:
|
||||
- id: 18
|
||||
name: WEBDL-2160p
|
||||
source: web
|
||||
resolution: 2160
|
||||
- id: 19
|
||||
qualities:
|
||||
- id: 19
|
||||
name: Bluray-2160p
|
||||
source: bluray
|
||||
- qualities:
|
||||
- id: 16
|
||||
name: HDTV-2160p
|
||||
source: television
|
||||
resolution: 2160
|
||||
- qualities:
|
||||
- id: 7
|
||||
name: Bluray-1080p
|
||||
source: bluray
|
||||
resolution: 1080
|
||||
- id: 1002
|
||||
name: "WEB 1080p"
|
||||
qualities:
|
||||
- id: 15
|
||||
name: WEBRip-1080p
|
||||
source: webRip
|
||||
resolution: 1080
|
||||
- id: 3
|
||||
name: WEBDL-1080p
|
||||
source: web
|
||||
resolution: 1080
|
||||
- qualities:
|
||||
- id: 6
|
||||
name: Bluray-720p
|
||||
source: bluray
|
||||
resolution: 720
|
||||
- id: 1001
|
||||
name: "WEB 720p"
|
||||
qualities:
|
||||
- id: 14
|
||||
name: WEBRip-720p
|
||||
source: webRip
|
||||
resolution: 720
|
||||
- id: 5
|
||||
name: WEBDL-720p
|
||||
source: web
|
||||
resolution: 720
|
||||
- qualities:
|
||||
- id: 9
|
||||
name: HDTV-1080p
|
||||
source: television
|
||||
resolution: 1080
|
||||
- qualities:
|
||||
- id: 4
|
||||
name: HDTV-720p
|
||||
source: television
|
||||
resolution: 720
|
||||
format_items:
|
||||
- name: hdr10
|
||||
format: hdr10
|
||||
|
||||
@@ -3,11 +3,10 @@ cutoff: 1
|
||||
cutoff_format_score: 0
|
||||
min_format_score: 0
|
||||
quality_groups:
|
||||
- id: 1
|
||||
qualities:
|
||||
- id: 1
|
||||
name: SDTV
|
||||
source: television
|
||||
- qualities:
|
||||
- id: 2
|
||||
name: DVD
|
||||
source: dvd
|
||||
resolution: 480
|
||||
- id: 1000
|
||||
name: "WEB 480p"
|
||||
@@ -20,10 +19,9 @@ quality_groups:
|
||||
name: WEBDL-480p
|
||||
source: web
|
||||
resolution: 480
|
||||
- id: 2
|
||||
qualities:
|
||||
- id: 2
|
||||
name: DVD
|
||||
source: dvd
|
||||
- qualities:
|
||||
- id: 1
|
||||
name: SDTV
|
||||
source: television
|
||||
resolution: 480
|
||||
format_items: []
|
||||
|
||||
+17
-4
@@ -21,6 +21,7 @@ resource "sonarr_quality_profile" "this" {
|
||||
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
|
||||
|
||||
format_items = [
|
||||
@@ -34,7 +35,7 @@ resource "sonarr_quality_profile" "this" {
|
||||
|
||||
resource "sonarr_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
|
||||
@@ -45,11 +46,15 @@ resource "sonarr_download_client_nzbget" "this" {
|
||||
tv_category = lookup(each.value, "tv_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 "sonarr_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)
|
||||
@@ -59,15 +64,19 @@ resource "sonarr_indexer_newznab" "this" {
|
||||
api_key = lookup(each.value, "api_key", "")
|
||||
categories = lookup(each.value, "categories", [])
|
||||
anime_categories = lookup(each.value, "anime_categories", [])
|
||||
|
||||
lifecycle {
|
||||
ignore_changes = [api_key]
|
||||
}
|
||||
}
|
||||
|
||||
resource "sonarr_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)
|
||||
|
||||
@@ -80,6 +89,10 @@ resource "sonarr_notification_emby" "this" {
|
||||
on_episode_file_delete = lookup(each.value, "on_episode_file_delete", true)
|
||||
on_episode_file_delete_for_upgrade = lookup(each.value, "on_episode_file_delete_for_upgrade", true)
|
||||
on_application_update = lookup(each.value, "on_application_update", true)
|
||||
|
||||
lifecycle {
|
||||
ignore_changes = [api_key]
|
||||
}
|
||||
}
|
||||
|
||||
resource "sonarr_delay_profile" "this" {
|
||||
|
||||
Reference in New Issue
Block a user