Hi all, does someone know if it is possible to ove...
# python
b
Hi all, does someone know if it is possible to override the resource options while inside of the on error hook? I would like to import resources when they already exist.
Opposed to importing it every single time within the code ofc.
n
No. An onError resource hook cannot change resource options. It runs after a retryable provider operation fails, and it can only return whether Pulumi must retry the same operation. This issue tracks the feature request for conditional creation/import of a resource github.com/pulumi/pulumi/issues/3388
b
Thanks @numerous-book-75463. I hope, one day, that the devs are able to find a solution for that issue. Understood from my last interaction about that issue that it is really hard to find a solution for it.
I assume the other hooks are also unable to change the resource options then. Only though transformation it can be achieved
e
I assume the other hooks are also unable to change the resource options then. Only though transformation it can be achieved
Yeh hooks run after options have already been processed, so changing them wouldn't have any effect anyway
I hope, one day, that the devs are able to find a solution for that issue.
We think we're close. We've had some internal discussions about this week, and might finally have something that solves this problem in general
b
Oh wow that would be great