feat: implement library resource and data source
This commit is contained in:
@@ -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"
|
||||
}
|
||||
Reference in New Issue
Block a user