Used `get_vpc` and upon previewing got the followi...
# aws
l
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
hey! if the vpc doesn't exist, wouldn't you just define it using Pulumi code?
l
Actually, the code creates the VPC and later queries it. I was previewing the code and ran into this error