docs: add examples and generate documentation for all new resources
This commit is contained in:
@@ -0,0 +1,35 @@
|
|||||||
|
---
|
||||||
|
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||||
|
page_title: "immich_server_info Data Source - terraform-provider-immich"
|
||||||
|
subcategory: ""
|
||||||
|
description: |-
|
||||||
|
Retrieves information about the Immich server.
|
||||||
|
---
|
||||||
|
|
||||||
|
# immich_server_info (Data Source)
|
||||||
|
|
||||||
|
Retrieves information about the Immich server.
|
||||||
|
|
||||||
|
## Example Usage
|
||||||
|
|
||||||
|
```terraform
|
||||||
|
data "immich_server_info" "current" {}
|
||||||
|
|
||||||
|
output "server_version" {
|
||||||
|
value = data.immich_server_info.current.version
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
<!-- schema generated by tfplugindocs -->
|
||||||
|
## Schema
|
||||||
|
|
||||||
|
### Read-Only
|
||||||
|
|
||||||
|
- `build` (String) Build ID.
|
||||||
|
- `exiftool` (String) ExifTool version.
|
||||||
|
- `ffmpeg` (String) FFmpeg version.
|
||||||
|
- `id` (String) The ID of this resource.
|
||||||
|
- `imagemagick` (String) ImageMagick version.
|
||||||
|
- `libvips` (String) libvips version.
|
||||||
|
- `nodejs` (String) Node.js version.
|
||||||
|
- `version` (String) Server version.
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
---
|
||||||
|
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||||
|
page_title: "immich_memory Resource - terraform-provider-immich"
|
||||||
|
subcategory: ""
|
||||||
|
description: |-
|
||||||
|
Manages an Immich memory.
|
||||||
|
---
|
||||||
|
|
||||||
|
# immich_memory (Resource)
|
||||||
|
|
||||||
|
Manages an Immich memory.
|
||||||
|
|
||||||
|
## Example Usage
|
||||||
|
|
||||||
|
```terraform
|
||||||
|
resource "immich_memory" "example" {
|
||||||
|
memory_at = "2023-06-01T00:00:00Z"
|
||||||
|
is_saved = true
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
<!-- schema generated by tfplugindocs -->
|
||||||
|
## Schema
|
||||||
|
|
||||||
|
### Required
|
||||||
|
|
||||||
|
- `memory_at` (String) The date the memory represents (ISO 8601).
|
||||||
|
|
||||||
|
### Optional
|
||||||
|
|
||||||
|
- `is_saved` (Boolean) Whether the memory is saved by the user.
|
||||||
|
|
||||||
|
### Read-Only
|
||||||
|
|
||||||
|
- `id` (String) Unique identifier for the memory.
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
---
|
||||||
|
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||||
|
page_title: "immich_partner Resource - terraform-provider-immich"
|
||||||
|
subcategory: ""
|
||||||
|
description: |-
|
||||||
|
Manages an Immich partner connection.
|
||||||
|
---
|
||||||
|
|
||||||
|
# immich_partner (Resource)
|
||||||
|
|
||||||
|
Manages an Immich partner connection.
|
||||||
|
|
||||||
|
## Example Usage
|
||||||
|
|
||||||
|
```terraform
|
||||||
|
resource "immich_partner" "example" {
|
||||||
|
partner_id = "other-user-uuid"
|
||||||
|
in_timeline = true
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
<!-- schema generated by tfplugindocs -->
|
||||||
|
## Schema
|
||||||
|
|
||||||
|
### Required
|
||||||
|
|
||||||
|
- `partner_id` (String) The ID of the user to partner with.
|
||||||
|
|
||||||
|
### Optional
|
||||||
|
|
||||||
|
- `in_timeline` (Boolean) Whether the partner's assets should appear in your timeline.
|
||||||
|
|
||||||
|
### Read-Only
|
||||||
|
|
||||||
|
- `email` (String) Email of the partner user.
|
||||||
|
- `name` (String) Name of the partner user.
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
---
|
||||||
|
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||||
|
page_title: "immich_person Resource - terraform-provider-immich"
|
||||||
|
subcategory: ""
|
||||||
|
description: |-
|
||||||
|
Manages an Immich person. Note: Persons are usually created automatically by Immich facial recognition. This resource is used to update their details.
|
||||||
|
---
|
||||||
|
|
||||||
|
# immich_person (Resource)
|
||||||
|
|
||||||
|
Manages an Immich person. Note: Persons are usually created automatically by Immich facial recognition. This resource is used to update their details.
|
||||||
|
|
||||||
|
## Example Usage
|
||||||
|
|
||||||
|
```terraform
|
||||||
|
resource "immich_person" "example" {
|
||||||
|
id = "your-person-uuid"
|
||||||
|
name = "John Doe"
|
||||||
|
birth_date = "1990-01-01"
|
||||||
|
is_hidden = false
|
||||||
|
is_favorite = true
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
<!-- schema generated by tfplugindocs -->
|
||||||
|
## Schema
|
||||||
|
|
||||||
|
### Required
|
||||||
|
|
||||||
|
- `id` (String) Unique identifier for the person.
|
||||||
|
|
||||||
|
### Optional
|
||||||
|
|
||||||
|
- `birth_date` (String) Birth date of the person (ISO 8601).
|
||||||
|
- `is_favorite` (Boolean) Whether the person is marked as a favorite.
|
||||||
|
- `is_hidden` (Boolean) Whether the person is hidden from the UI.
|
||||||
|
- `name` (String) Name of the person.
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
---
|
||||||
|
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||||
|
page_title: "immich_stack Resource - terraform-provider-immich"
|
||||||
|
subcategory: ""
|
||||||
|
description: |-
|
||||||
|
Manages an Immich asset stack.
|
||||||
|
---
|
||||||
|
|
||||||
|
# immich_stack (Resource)
|
||||||
|
|
||||||
|
Manages an Immich asset stack.
|
||||||
|
|
||||||
|
## Example Usage
|
||||||
|
|
||||||
|
```terraform
|
||||||
|
resource "immich_stack" "example" {
|
||||||
|
asset_ids = [
|
||||||
|
"asset-uuid-1",
|
||||||
|
"asset-uuid-2"
|
||||||
|
]
|
||||||
|
primary_asset_id = "asset-uuid-1"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
<!-- schema generated by tfplugindocs -->
|
||||||
|
## Schema
|
||||||
|
|
||||||
|
### Required
|
||||||
|
|
||||||
|
- `asset_ids` (List of String) List of asset IDs to include in the stack. The first ID will be the primary asset by default.
|
||||||
|
|
||||||
|
### Optional
|
||||||
|
|
||||||
|
- `primary_asset_id` (String) The ID of the primary asset in the stack.
|
||||||
|
|
||||||
|
### Read-Only
|
||||||
|
|
||||||
|
- `id` (String) Unique identifier for the stack.
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||||
|
page_title: "immich_tag Resource - terraform-provider-immich"
|
||||||
|
subcategory: ""
|
||||||
|
description: |-
|
||||||
|
Manages an Immich tag.
|
||||||
|
---
|
||||||
|
|
||||||
|
# immich_tag (Resource)
|
||||||
|
|
||||||
|
Manages an Immich tag.
|
||||||
|
|
||||||
|
## Example Usage
|
||||||
|
|
||||||
|
```terraform
|
||||||
|
resource "immich_tag" "example" {
|
||||||
|
name = "Vacation"
|
||||||
|
type = "OBJECT"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
<!-- schema generated by tfplugindocs -->
|
||||||
|
## Schema
|
||||||
|
|
||||||
|
### Required
|
||||||
|
|
||||||
|
- `name` (String) Name of the tag.
|
||||||
|
- `type` (String) Type of the tag (OBJECT or USER).
|
||||||
|
|
||||||
|
### Read-Only
|
||||||
|
|
||||||
|
- `id` (String) Unique identifier for the tag.
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
---
|
||||||
|
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
||||||
|
page_title: "immich_workflow Resource - terraform-provider-immich"
|
||||||
|
subcategory: ""
|
||||||
|
description: |-
|
||||||
|
Manages an Immich workflow (Experimental).
|
||||||
|
---
|
||||||
|
|
||||||
|
# immich_workflow (Resource)
|
||||||
|
|
||||||
|
Manages an Immich workflow (Experimental).
|
||||||
|
|
||||||
|
## Example Usage
|
||||||
|
|
||||||
|
```terraform
|
||||||
|
resource "immich_workflow" "example" {
|
||||||
|
name = "Auto-Tag Video"
|
||||||
|
enabled = true
|
||||||
|
|
||||||
|
triggers = jsonencode([
|
||||||
|
{
|
||||||
|
"type": "asset.upload",
|
||||||
|
"options": {}
|
||||||
|
}
|
||||||
|
])
|
||||||
|
|
||||||
|
filters = jsonencode([
|
||||||
|
{
|
||||||
|
"type": "asset.type",
|
||||||
|
"options": {
|
||||||
|
"type": "video"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
])
|
||||||
|
|
||||||
|
actions = jsonencode([
|
||||||
|
{
|
||||||
|
"type": "asset.tag",
|
||||||
|
"options": {
|
||||||
|
"tagId": "your-tag-uuid"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
])
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
<!-- schema generated by tfplugindocs -->
|
||||||
|
## Schema
|
||||||
|
|
||||||
|
### Required
|
||||||
|
|
||||||
|
- `actions` (String) JSON string representing the workflow actions.
|
||||||
|
- `name` (String) Name of the workflow.
|
||||||
|
- `triggers` (String) JSON string representing the workflow triggers.
|
||||||
|
|
||||||
|
### Optional
|
||||||
|
|
||||||
|
- `enabled` (Boolean) Whether the workflow is enabled.
|
||||||
|
- `filters` (String) JSON string representing the workflow filters.
|
||||||
|
|
||||||
|
### Read-Only
|
||||||
|
|
||||||
|
- `id` (String) Unique identifier for the workflow.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
data "immich_server_info" "current" {}
|
||||||
|
|
||||||
|
output "server_version" {
|
||||||
|
value = data.immich_server_info.current.version
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
resource "immich_memory" "example" {
|
||||||
|
memory_at = "2023-06-01T00:00:00Z"
|
||||||
|
is_saved = true
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
resource "immich_partner" "example" {
|
||||||
|
partner_id = "other-user-uuid"
|
||||||
|
in_timeline = true
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
resource "immich_person" "example" {
|
||||||
|
id = "your-person-uuid"
|
||||||
|
name = "John Doe"
|
||||||
|
birth_date = "1990-01-01"
|
||||||
|
is_hidden = false
|
||||||
|
is_favorite = true
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
resource "immich_stack" "example" {
|
||||||
|
asset_ids = [
|
||||||
|
"asset-uuid-1",
|
||||||
|
"asset-uuid-2"
|
||||||
|
]
|
||||||
|
primary_asset_id = "asset-uuid-1"
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
resource "immich_tag" "example" {
|
||||||
|
name = "Vacation"
|
||||||
|
type = "OBJECT"
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
resource "immich_workflow" "example" {
|
||||||
|
name = "Auto-Tag Video"
|
||||||
|
enabled = true
|
||||||
|
|
||||||
|
triggers = jsonencode([
|
||||||
|
{
|
||||||
|
"type": "asset.upload",
|
||||||
|
"options": {}
|
||||||
|
}
|
||||||
|
])
|
||||||
|
|
||||||
|
filters = jsonencode([
|
||||||
|
{
|
||||||
|
"type": "asset.type",
|
||||||
|
"options": {
|
||||||
|
"type": "video"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
])
|
||||||
|
|
||||||
|
actions = jsonencode([
|
||||||
|
{
|
||||||
|
"type": "asset.tag",
|
||||||
|
"options": {
|
||||||
|
"tagId": "your-tag-uuid"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
])
|
||||||
|
}
|
||||||
@@ -71,7 +71,6 @@ func (r *workflowResource) Schema(ctx context.Context, req resource.SchemaReques
|
|||||||
"filters": schema.StringAttribute{
|
"filters": schema.StringAttribute{
|
||||||
Optional: true,
|
Optional: true,
|
||||||
Computed: true,
|
Computed: true,
|
||||||
Default: booldefault.StaticBool(false), // placeholder for empty
|
|
||||||
MarkdownDescription: "JSON string representing the workflow filters.",
|
MarkdownDescription: "JSON string representing the workflow filters.",
|
||||||
},
|
},
|
||||||
"actions": schema.StringAttribute{
|
"actions": schema.StringAttribute{
|
||||||
|
|||||||
Reference in New Issue
Block a user