<@ULVA73B9P> is it possible to have deployment exe...
# ask-marvin
c
@Marvin is it possible to have deployment executions trigger other deployment executions?
m
Yes, it is possible to have deployment executions trigger other deployment executions in Prefect using deployment triggers. This allows for the configuration of event-driven deployments that can run based on the presence or absence of events. Here is an example of automations in the
prefect.yaml
that trigger deployments:
Copy code
yaml
deployments:
- name: my-deployment
  entrypoint: path/to/flow.py:decorated_fn
  work_pool:
    name: my-process-pool
  triggers:
    - enabled: true
      match:
        prefect.resource.id: my.external.resource
      expect:
        - external.resource.pinged
      parameters:
        param_1: "{{ event }}"
At deployment time, this creates a linked automation that is triggered by events matching your chosen grammar, which will then pass the event as a parameter to the deployment's flow run. You can find more information about automations in the Prefect documentation on automations.