Need to handle when the resource existed and need to heal it what the options that should be applied (delete existing and create new) ?
The following points need to be considered:
In order to heal we need to have details for the resource already created and resource_id will not be enough to do that since both heal/scale requires to trigger create operation task in order to create new node instance
We need to find a way to provide required details for external resource to be used by the heal workflow so that we can apply and create new node instance
Healing could lead to problems like if the resource is referenced by another resource and cannot be deleted and created again
I'm not sure if all of our use_external'ed resources have all the details they need to actually recreate the original entity.
Also, it might be rather unexpected for a user to have an external resource deleted (even if it was about to be recreated), and might even cause problems (e.g. a VM might come up with a new IP when the original was created with a specific IP for , e.g. policy reasons. Therefore I think something like this, if we were to support it (and I'm not 100% sure we should?) would be best gated behind an extra parameter either in the heal or on the resource, something like 'allow_heal_on_external_resource'.
Thanks for your reply about this and it really make sense for me. I created this ticket in order to find best solution that we can do for this case
bug scrub meeting on 14/7/2019 - moved to future