I have an issue with error handling. I would like to create a private link only if the key vault resource already exists.
Is it possible to develop a try-catch statement to
catch any error that may occur so that the pulumi execution does not
fail? It should be okay if the resource does not exist, the PE should
just not be created.
Is this a possibility? Also, is it possible to validate this in resources from other Azure subscriptions?
05/30/2023, 3:54 PM
This isn’t really how Pulumi works, it operates on a desired state model. If the resource exists, you really need to import it into state.
You as the operator will have to know if the resource exists or not. you can do these with a boolean flag in config, but there’s no try catch options