This topic has been mentioned before, however, I am yet to find anything conclusive, so thought I’d ask here about the current state of pre- or post-apply hooks, and whether there is any hope that they might be included in either the SDK or Framework.
My use case: I am building a provider for a system that requires activation in order to effect the changes made through the API. It is also necessary to call an endpoint to terminate the session - this is certainly not crucial to the success of the provider, however, it would be nice to be able to gracefully terminate sessions.
Currently, the only way I can see to do this would be to include the calls to the activation and session termination endpoints as either data sources or resources, and require that users of the provider use depends_on to ensure that these calls will only be made as the last step. This certainly seems less than ideal, and I haven’t yet been able to test if this will even work.
So my questions:
- Is there already, or will there ever be, support for post-apply hooks, in either the Plugin Framework or SDK v2?
- Is there a better way to handle APIs requiring some form of post-apply step, such as activation, session termination, or similar?
I would like to handle the activation and session termination from within the Provider itself - so I am not looking for solutions that depend on a wrapper.