Azure Trigger

Azure Trigger

Certified

Trigger a flow when a pg_durable instance reaches a target status

Polls df.list_instances() on an interval and starts an execution the first time one or more instances are newly seen in, or newly transition to, targetStatus. Already-seen instances that remain in targetStatus do not refire; state is persisted in the flow's namespace KV store. Each poll opens and closes its own JDBC connection, so interval should not be set unreasonably low.

yaml
type: io.kestra.plugin.azure.horizondb.durable.Trigger

Trigger a flow when a durable function instance completes

yaml
id: horizondb_durable_on_completion
namespace: company.team

triggers:
  - id: on_durable_complete
    type: io.kestra.plugin.azure.horizondb.durable.Trigger
    host: "{{ secret('HORIZONDB_HOST') }}"
    port: 5432
    database: mydb
    username: "{{ secret('HORIZONDB_USERNAME') }}"
    password: "{{ secret('HORIZONDB_PASSWORD') }}"
    targetStatus: Completed
    interval: PT30S

tasks:
  - id: log_completion
    type: io.kestra.plugin.core.log.Log
    message: "Durable instance {{ trigger.instances[0].instance_id }} completed"
Properties

Database name

HorizonDB server host

Hostname of the Azure HorizonDB server, without protocol or port.

Target status

Instance status to watch for (e.g. Completed, Failed, Cancelled).

Defaultfalse

Specifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.

Azure client id

Used with tenantId/clientSecret for service principal authentication when useEntraId is true. Ignored otherwise.

Azure client secret

Used with tenantId/clientId for service principal authentication when useEntraId is true. Ignored otherwise.

DefaultPT1M
Formatduration

Polling interval

How often to poll df.list_instances(). Defaults to 60 seconds.

DefaultCREATE_OR_UPDATE
Possible Values
CREATEUPDATECREATE_OR_UPDATE

State transition to fire on

CREATE_OR_UPDATE (the default) fires when an instance id is newly seen in targetStatus, or newly transitions into it; other StatefulTriggerInterface.On values follow the same semantics as file-based stateful triggers.

Password

Required unless useEntraId is true.

Default5432

HorizonDB server port

Defaults to the standard PostgreSQL port.

Defaulttrue

Require TLS

When true (the default), each poll's connection is rejected unless it is encrypted (sslmode=require).

State store key

Namespace KV key used to persist which instance ids/statuses have already fired. Defaults to a key derived from the trigger's namespace, flow id, and trigger id.

State entry time-to-live

How long a seen instance id is remembered in the state store. Unset means entries are kept indefinitely.

SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED

List of execution states after which a trigger should be stopped (a.k.a. disabled).

Azure tenant id

Used with clientId/clientSecret for service principal authentication when useEntraId is true. Ignored otherwise.

Defaultfalse

Authenticate with Azure Entra ID

When true, authenticates using Azure Entra ID instead of a static password. With no further properties set, this falls back to whatever DefaultAzureCredential resolves on the worker; set tenantId/clientId/clientSecret below to authenticate as a specific service principal instead.

Username

Required unless useEntraId is true and the Entra ID token carries the identity.

Defaulttrue

A condition that determines whether the trigger should run.

A Pebble expression evaluated at trigger time. The trigger fires only when the expression evaluates to a truthy value (true, a non-empty string, a non-zero number). Use this to gate trigger execution on dynamic runtime values such as execution labels, flow variables, or environment conditions.

SubTypeobject

Matching instances

Only populated when fetchType is FETCH.

Number of matching instances

Formaturi

URI of stored results in internal storage

Only populated when fetchType is STORE; stored using ION format.