Hi all! 🙂
I am having an issue with Pulumi error handling using Typescript.
I have created some resources on Azure:
• Virtual Network + subnets
• storage account
• blob privatelink
When I try to create several other privatelinks I am not able to validate if one of them already exists and only create the ones that don't exist yet.
I have followed the following logic:
• used a try-catch block
• in the try block I validate if the private DNS zone exists with the respective get function
◦ This will result in passing for the blob one, but failing to retrieve that information for the other 3 that don't exist yet
◦ I try to catch the errors and execute additional logic on the catch block
• in the catch block I implemented the logic to create the privatelinks ans DNS zone configurations, as well as private endpoints for the services that caused the error
What happens:
• the errors are not suppressed quietly by the catch block
• when I run
pulumi up
the errors are thrown and provisioning fails
Is there any way I can implement the logic I have mentioned without having those errors blocking my deployment?