OptionalafterHooks to be invoked after the resource is created.
OptionalafterHooks to be invoked after the resource is deleted.
Note that delete hooks require that destroy operations are run with --run-program. Unlike other hook types,
this argument requires named ResourceHook instances, and does not accept anonymous
ResourceHookFunction. This is because the engine needs to be able to identify a hook when a resource is
deleted.
OptionalafterHooks to be invoked after the resource is updated.
OptionalbeforeHooks to be invoked before the resource is created.
OptionalbeforeHooks to be invoked before the resource is deleted.
Note that delete hooks require that destroy operations are run with --run-program. Unlike other hook types,
this argument requires named ResourceHook instances, and does not accept anonymous
ResourceHookFunction. This is because the engine needs to be able to identify a hook when a resource is
deleted.
OptionalbeforeHooks to be invoked before the resource is updated.
OptionalonHooks to be invoked when an operation fails and is retryable.
Note that error hooks require named ErrorHook instances, and do not accept anonymous functions. The callback can return true to retry the operation, or false to not retry.
Binds ResourceHook instances to a resource. The resource hooks will be invoked during certain step of the lifecycle of the resource.
before_${action}hooks that raise an exception cause the action to fail.after_${action}hooks that raise an exception will log a warning, but do not cause the action or the deployment to fail.When running
pulumi destroy,before_deleteandafter_deleteresource hooks require the operation to run with--run-program, to ensure that the program which defines the hooks is available.