feat: implement library resource and data source

This commit is contained in:
2026-06-01 11:21:32 -04:00
parent 1337034f07
commit bcc8a1a47d
8 changed files with 633 additions and 0 deletions
@@ -0,0 +1,9 @@
data "immich_libraries" "all" {}
output "library_names" {
value = data.immich_libraries.all.libraries[*].name
}
output "external_libraries" {
value = [for l in data.immich_libraries.all.libraries : l if l.type == "EXTERNAL"]
}
@@ -0,0 +1,18 @@
resource "immich_library" "external" {
name = "My External Photos"
type = "EXTERNAL"
import_paths = [
"/mnt/photos/vacation_2023",
"/mnt/photos/family"
]
exclusion_patterns = [
"**/tmp/**",
"**/.DS_Store"
]
is_visible = true
}
resource "immich_library" "upload" {
name = "Personal Uploads"
type = "UPLOAD"
}