https://pulumi.com logo
#general
Title
# general
s

stocky-petabyte-29883

07/15/2022, 11:06 PM
Hey Can I check if a resource exists in pulumi without throwing an error? I am trying to see if an LB exists and if it does then create some subsequent resources. I tried wrapping the get method in a try catch without much success
l

little-cartoon-10569

07/15/2022, 11:39 PM
The idiomatic way to do this is to import the LB once, then never check again.
s

stocky-petabyte-29883

07/16/2022, 8:08 AM
I need this behaviour at the initial execution of every stsck So no I need the behaviour, is it possible to it with pulumi
Is there a way to check if a resource exists in pulumi and to not fail the execution if it doesn't exist
e

echoing-dinner-19531

07/16/2022, 9:33 AM
s

stocky-petabyte-29883

07/16/2022, 9:34 AM
Yup
e

echoing-dinner-19531

07/16/2022, 9:36 AM
Do vote and comment your use case on there if it's not already covered. Active tickets are easier to prioritise.
7 Views