feat: implement faces api with resource and data source

This commit is contained in:
2026-06-01 12:21:02 -04:00
parent 07dea33680
commit d9281bcde9
8 changed files with 614 additions and 0 deletions
+48
View File
@@ -0,0 +1,48 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "immich_faces Data Source - immich"
subcategory: ""
description: |-
Retrieves a list of faces for a specific asset.
---
# immich_faces (Data Source)
Retrieves a list of faces for a specific asset.
## Example Usage
```terraform
data "immich_faces" "current" {
asset_id = "your-asset-uuid"
}
output "detected_faces" {
value = data.immich_faces.current.faces
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `asset_id` (String) The ID of the asset.
### Read-Only
- `faces` (Attributes List) List of faces. (see [below for nested schema](#nestedatt--faces))
<a id="nestedatt--faces"></a>
### Nested Schema for `faces`
Read-Only:
- `bounding_box_x1` (Number) The left coordinate of the bounding box.
- `bounding_box_x2` (Number) The right coordinate of the bounding box.
- `bounding_box_y1` (Number) The top coordinate of the bounding box.
- `bounding_box_y2` (Number) The bottom coordinate of the bounding box.
- `id` (String) Unique identifier for the face.
- `image_height` (Number) The height of the image in pixels.
- `image_width` (Number) The width of the image in pixels.
- `person_id` (String) The ID of the person associated with this face.
+44
View File
@@ -0,0 +1,44 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "immich_face Resource - immich"
subcategory: ""
description: |-
Manages an Immich face (detected or manual).
---
# immich_face (Resource)
Manages an Immich face (detected or manual).
## Example Usage
```terraform
resource "immich_face" "manual" {
asset_id = "your-asset-uuid"
person_id = "your-person-uuid"
bounding_box_x1 = 100.5
bounding_box_y1 = 100.5
bounding_box_x2 = 200.5
bounding_box_y2 = 200.5
image_height = 1080
image_width = 1920
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `asset_id` (String) The ID of the asset this face belongs to.
- `bounding_box_x1` (Number) The left coordinate of the bounding box.
- `bounding_box_x2` (Number) The right coordinate of the bounding box.
- `bounding_box_y1` (Number) The top coordinate of the bounding box.
- `bounding_box_y2` (Number) The bottom coordinate of the bounding box.
- `image_height` (Number) The height of the image in pixels.
- `image_width` (Number) The width of the image in pixels.
- `person_id` (String) The ID of the person associated with this face.
### Read-Only
- `id` (String) Unique identifier for the face.