# general


12/13/2019, 8:01 PM
Is it possible to write a provider that forces an update when a resource that it dependsOn is updated? I could serialize its inputs as JSON and compare the string, but I wonder if there is a more elegant way.


12/14/2019, 5:40 PM
I actually chose a similar strategy! I wrote the provider, had it accept a list of Pulumi resource ids (dependencies I wanted to bind my custom resource to). And then I marked up logic in the ‘diff’ method of the provider to signal a replacement if any of those strings changed. I didn’t even have to set an explicit “dependsOn” because I think it’s implicit if you feed any resource/resource’s lifted value to the custom resource implemented on top of your provider. But if you find a better way, also let me know! 😅 I am genuinely curious how others tie a Custom Resource’s lifetime to other standard stock resources.