https://prefect.io logo
n

Nelson Griffiths

07/11/2023, 6:31 PM
Can I create triggers in the definitions section of the
prefect.yaml
file and reuse the same trigger across multiple deployments? Or do I have to write out the trigger for each deployment?
w

Will Raphaelson

07/11/2023, 8:38 PM
you do not have to rewrite - specifying a trigger in the prefect.yaml will essentially be a default for all applied deployments.
n

Nelson Griffiths

07/11/2023, 8:58 PM
Oh I see. Then I can overwrite it on specific deployments if I choose to?
w

Will Raphaelson

07/11/2023, 8:59 PM
precisely
n

Nelson Griffiths

07/11/2023, 8:59 PM
@Will Raphaelson I am so excited for this + webhooks! Thanks!
w

Will Raphaelson

07/11/2023, 9:00 PM
hell yeah! me too. the engineers really crushed it on the webhook implementation IMO.
🔥 1
n

Nelson Griffiths

07/12/2023, 6:01 PM
Is there a way to set the default and then just put no default on a specific deployment? An empty list on the deployment?
w

Will Raphaelson

07/12/2023, 6:05 PM
havent done it but i have reasonably high confidence that’s the correct spelling.
n

Nelson Griffiths

07/13/2023, 4:58 PM
@Will Raphaelson I am having issues with this:
Copy code
triggers:
  - enabled: true
    match:
      prefect.resource.id: prefect.flow-run.*
    expect:
      - prefect.flow-run.Completed
    match_related:
      prefect.resource.name: falcon_cap_iq_dbt_deployment
      prefect.resource.role: deployment
I have this entry in my
prefect.yaml
at the top and a list of deployments in the file that have no trigger specification. After deploying them, none of them had this trigger attached to them.
w

Will Raphaelson

07/13/2023, 6:02 PM
Per our DMs, i was wrong, and here’s the isuse to watch 🙂 https://github.com/PrefectHQ/prefect/issues/10223
👍 1