https://pulumi.com logo
#aws
Title
# aws
l

limited-pager-46264

01/12/2021, 1:06 PM
Used
get_vpc
and upon previewing got the following error:
Copy code
Exception: invocation of aws:ec2/getVpc:getVpc returned an error: invoking aws:ec2/getVpc:getVpc: 1 error occurred:
	* no matching VPC found
Is this expected? If not, any idea about the fix?
Ok….I’ll have to workaround it using exceptions, in case the vpc doesn’t exist. Thanks!
b

billowy-army-68599

01/12/2021, 4:59 PM
hey! if the vpc doesn't exist, wouldn't you just define it using Pulumi code?
l

limited-pager-46264

01/13/2021, 5:54 AM
Actually, the code creates the VPC and later queries it. I was previewing the code and ran into this error