https://pulumi.com logo
#general
Title
# general
c

cool-egg-852

02/24/2020, 6:59 PM
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

white-balloon-205

02/24/2020, 7:03 PM
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

cool-egg-852

02/24/2020, 7:05 PM
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

white-balloon-205

02/24/2020, 7:18 PM
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

cool-egg-852

02/24/2020, 7:21 PM
Seems a little hacky. I’ll probably avoid doing this as it isn’t critical. I dislike using workarounds.