Is there a way to listen to pulumi completing the ...
# general
c
Is there a way to listen to pulumi completing the change for a resource? I want to be able to update GitHub using https://developer.github.com/v3/repos/deployments/#create-a-deployment-status so that when I deploy a new image for a Deployment, I can update GitHub on this. But I need to be able to know that the changes were completed for a specific resource.
w
There is a Pulumi WebHooks that fires on updates completing, and an API to export state files. Together you could likely implement this? See https://www.pulumi.com/blog/getting-to-chatops-with-pulumi-webhooks/ for some content related to this.
c
Not really how I want to solve it. I’ll probably wait for the long awaited ticket with proper hooks I found on github
Though it’s sad to see critical functions like this take back seat to further language SDKs.
w
I see - you want to trigger from within the program. You may be able to use a dynamic provider to accomplish this today - a provider which has an input property depending on the
Deployment
identity (or some particularly output which tracks changes) which forces replacement whenever the
Deployment
changes, and then makes the API call in question as part of it's
Create
handler.
c
Seems a little hacky. I’ll probably avoid doing this as it isn’t critical. I dislike using workarounds.