https://pulumi.com logo
#python
Title
# python
a

astonishing-quill-88807

06/16/2020, 4:56 PM
So, when I try to use a call to
get_vpc
that doesn't match an existing resource, it throws an exception which still causes execution to fail even if I catch it. What's the option for handling that situation?
e

echoing-breakfast-73834

06/16/2020, 6:57 PM
Hopefully somebody from the Pulumi team can chime in here with a better way - but I've only been able to solve the issue by using boto3/similar third party library when I want to use the functionality of `get_vpc`/similar to check if a resource already exists.
a

astonishing-quill-88807

06/16/2020, 7:32 PM
That's a fair option and one I was suspecting would be the eventual path. Thanks for your input 🙂