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_automatic_search: true
|
||||||
enable_interactive_search: true
|
enable_interactive_search: true
|
||||||
enable_rss: true
|
enable_rss: true
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
name: "Emby / Jellyfin"
|
||||||
host: jellyfin.service.consul
|
host: jellyfin.service.consul
|
||||||
port: 443
|
port: 443
|
||||||
use_ssl: true
|
use_ssl: true
|
||||||
|
|||||||
@@ -3,54 +3,48 @@ cutoff: 7
|
|||||||
cutoff_format_score: 5000
|
cutoff_format_score: 5000
|
||||||
min_format_score: 0
|
min_format_score: 0
|
||||||
quality_groups:
|
quality_groups:
|
||||||
- id: 4
|
- qualities:
|
||||||
qualities:
|
- id: 7
|
||||||
- id: 4
|
name: Bluray-1080p
|
||||||
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
|
|
||||||
source: bluray
|
source: bluray
|
||||||
resolution: 720
|
resolution: 1080
|
||||||
- id: 15
|
- id: 1002
|
||||||
|
name: "WEB 1080p"
|
||||||
qualities:
|
qualities:
|
||||||
- id: 15
|
- id: 15
|
||||||
name: WEBRip-1080p
|
name: WEBRip-1080p
|
||||||
source: webRip
|
source: webRip
|
||||||
resolution: 1080
|
resolution: 1080
|
||||||
- id: 3
|
|
||||||
qualities:
|
|
||||||
- id: 3
|
- id: 3
|
||||||
name: WEBDL-1080p
|
name: WEBDL-1080p
|
||||||
source: web
|
source: web
|
||||||
resolution: 1080
|
resolution: 1080
|
||||||
- id: 7
|
- qualities:
|
||||||
qualities:
|
- id: 6
|
||||||
- id: 7
|
name: Bluray-720p
|
||||||
name: Bluray-1080p
|
|
||||||
source: bluray
|
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
|
resolution: 1080
|
||||||
|
- qualities:
|
||||||
|
- id: 4
|
||||||
|
name: HDTV-720p
|
||||||
|
source: television
|
||||||
|
resolution: 720
|
||||||
format_items:
|
format_items:
|
||||||
- name: release_AsmoFuscated
|
- name: release_AsmoFuscated
|
||||||
format: release_AsmoFuscated
|
format: release_AsmoFuscated
|
||||||
|
|||||||
@@ -3,78 +3,69 @@ cutoff: 19
|
|||||||
cutoff_format_score: 5000
|
cutoff_format_score: 5000
|
||||||
min_format_score: 0
|
min_format_score: 0
|
||||||
quality_groups:
|
quality_groups:
|
||||||
- id: 4
|
- qualities:
|
||||||
qualities:
|
- id: 19
|
||||||
- id: 4
|
name: Bluray-2160p
|
||||||
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
|
|
||||||
source: bluray
|
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
|
resolution: 2160
|
||||||
- id: 17
|
- id: 1003
|
||||||
|
name: "WEB 2160p"
|
||||||
qualities:
|
qualities:
|
||||||
- id: 17
|
- id: 17
|
||||||
name: WEBRip-2160p
|
name: WEBRip-2160p
|
||||||
source: webRip
|
source: webRip
|
||||||
resolution: 2160
|
resolution: 2160
|
||||||
- id: 18
|
|
||||||
qualities:
|
|
||||||
- id: 18
|
- id: 18
|
||||||
name: WEBDL-2160p
|
name: WEBDL-2160p
|
||||||
source: web
|
source: web
|
||||||
resolution: 2160
|
resolution: 2160
|
||||||
- id: 19
|
- qualities:
|
||||||
qualities:
|
- id: 16
|
||||||
- id: 19
|
name: HDTV-2160p
|
||||||
name: Bluray-2160p
|
source: television
|
||||||
source: bluray
|
|
||||||
resolution: 2160
|
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:
|
format_items:
|
||||||
- name: hdr10
|
- name: hdr10
|
||||||
format: hdr10
|
format: hdr10
|
||||||
|
|||||||
@@ -3,11 +3,10 @@ cutoff: 1
|
|||||||
cutoff_format_score: 0
|
cutoff_format_score: 0
|
||||||
min_format_score: 0
|
min_format_score: 0
|
||||||
quality_groups:
|
quality_groups:
|
||||||
- id: 1
|
- qualities:
|
||||||
qualities:
|
- id: 2
|
||||||
- id: 1
|
name: DVD
|
||||||
name: SDTV
|
source: dvd
|
||||||
source: television
|
|
||||||
resolution: 480
|
resolution: 480
|
||||||
- id: 1000
|
- id: 1000
|
||||||
name: "WEB 480p"
|
name: "WEB 480p"
|
||||||
@@ -20,10 +19,9 @@ quality_groups:
|
|||||||
name: WEBDL-480p
|
name: WEBDL-480p
|
||||||
source: web
|
source: web
|
||||||
resolution: 480
|
resolution: 480
|
||||||
- id: 2
|
- qualities:
|
||||||
qualities:
|
- id: 1
|
||||||
- id: 2
|
name: SDTV
|
||||||
name: DVD
|
source: television
|
||||||
source: dvd
|
|
||||||
resolution: 480
|
resolution: 480
|
||||||
format_items: []
|
format_items: []
|
||||||
|
|||||||
+20
-7
@@ -19,9 +19,10 @@ resource "sonarr_quality_profile" "this" {
|
|||||||
name = each.key
|
name = each.key
|
||||||
upgrade_allowed = lookup(each.value, "upgrade_allowed", false)
|
upgrade_allowed = lookup(each.value, "upgrade_allowed", false)
|
||||||
cutoff = each.value.cutoff
|
cutoff = each.value.cutoff
|
||||||
cutoff_format_score = lookup(each.value, "cutoff_format_score", 0)
|
cutoff_format_score = lookup(each.value, "cutoff_format_score", 0)
|
||||||
min_format_score = lookup(each.value, "min_format_score", 0)
|
min_format_score = lookup(each.value, "min_format_score", 0)
|
||||||
quality_groups = each.value.quality_groups
|
min_upgrade_format_score = lookup(each.value, "min_upgrade_format_score", 0)
|
||||||
|
quality_groups = each.value.quality_groups
|
||||||
|
|
||||||
format_items = [
|
format_items = [
|
||||||
for fi in lookup(each.value, "format_items", []) : {
|
for fi in lookup(each.value, "format_items", []) : {
|
||||||
@@ -34,7 +35,7 @@ resource "sonarr_quality_profile" "this" {
|
|||||||
|
|
||||||
resource "sonarr_download_client_nzbget" "this" {
|
resource "sonarr_download_client_nzbget" "this" {
|
||||||
for_each = var.download_clients
|
for_each = var.download_clients
|
||||||
name = each.key
|
name = lookup(each.value, "name", each.key)
|
||||||
enable = lookup(each.value, "enable", true)
|
enable = lookup(each.value, "enable", true)
|
||||||
priority = lookup(each.value, "priority", 1)
|
priority = lookup(each.value, "priority", 1)
|
||||||
host = each.value.host
|
host = each.value.host
|
||||||
@@ -45,11 +46,15 @@ resource "sonarr_download_client_nzbget" "this" {
|
|||||||
tv_category = lookup(each.value, "tv_category", "")
|
tv_category = lookup(each.value, "tv_category", "")
|
||||||
remove_completed_downloads = lookup(each.value, "remove_completed_downloads", true)
|
remove_completed_downloads = lookup(each.value, "remove_completed_downloads", true)
|
||||||
remove_failed_downloads = lookup(each.value, "remove_failed_downloads", true)
|
remove_failed_downloads = lookup(each.value, "remove_failed_downloads", true)
|
||||||
|
|
||||||
|
lifecycle {
|
||||||
|
ignore_changes = [password]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "sonarr_indexer_newznab" "this" {
|
resource "sonarr_indexer_newznab" "this" {
|
||||||
for_each = var.indexers
|
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_automatic_search = lookup(each.value, "enable_automatic_search", true)
|
||||||
enable_interactive_search = lookup(each.value, "enable_interactive_search", true)
|
enable_interactive_search = lookup(each.value, "enable_interactive_search", true)
|
||||||
enable_rss = lookup(each.value, "enable_rss", 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", "")
|
api_key = lookup(each.value, "api_key", "")
|
||||||
categories = lookup(each.value, "categories", [])
|
categories = lookup(each.value, "categories", [])
|
||||||
anime_categories = lookup(each.value, "anime_categories", [])
|
anime_categories = lookup(each.value, "anime_categories", [])
|
||||||
|
|
||||||
|
lifecycle {
|
||||||
|
ignore_changes = [api_key]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "sonarr_notification_emby" "this" {
|
resource "sonarr_notification_emby" "this" {
|
||||||
for_each = var.notifications
|
for_each = var.notifications
|
||||||
name = each.key
|
name = lookup(each.value, "name", each.key)
|
||||||
host = each.value.host
|
host = each.value.host
|
||||||
port = each.value.port
|
port = each.value.port
|
||||||
use_ssl = lookup(each.value, "use_ssl", false)
|
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)
|
notify = lookup(each.value, "notify", false)
|
||||||
update_library = lookup(each.value, "update_library", true)
|
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 = 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_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)
|
on_application_update = lookup(each.value, "on_application_update", true)
|
||||||
|
|
||||||
|
lifecycle {
|
||||||
|
ignore_changes = [api_key]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "sonarr_delay_profile" "this" {
|
resource "sonarr_delay_profile" "this" {
|
||||||
|
|||||||
Reference in New Issue
Block a user