This message was deleted.
# general
s
This message was deleted.
g
You can use https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/pulumi/runtime/#isDryRun to only run during the
update
. We don't currently have lifecycle type events that you can hook into.
w
I saw you have the concept of custom resources whose providers manage CRUD operations. Is there a way for me to add functions to the existing CRUD operations for an aws instance?
So that my code would run after-create and before-destroy?
g
No, you can't augment the existing CRUD operations, but you can create your own ComponentResource's.
w
Would the ComponentResource be able to differentiate between initial deploy, update of existing server, and destroy?
g
Err... sorry, I think you'll want dynamic provider - that way you can get
create
,
update
,
delete
calls. https://www.pulumi.com/docs/intro/concepts/programming-model/#dynamicproviders
w
I'll give that a try. So the assumption is that this custom resource will run alongside the server instance and mirror its state?
g
It would be a separate resource with its own state. You can pass other resource outputs into the resource(s) provided by your dynamic provider to "integrate" them.