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

big-angle-30002

08/05/2023, 10:14 AM
Hi, guys! I´m coding a AWS VPC use case. if the user has a vpc then provides the ID other wise the vpc will be created. So it was running OK but after use pulumi down - pulumi up for a couple of times I got a error
Exception: invoke of aws:ec2/getVpc:getVpc failed: invocation of aws:ec2/getVpc:getVpc returned an error: invoking aws:ec2/getVpc:getVpc: 1 error occurred:
* multiple EC2 VPCs matched; use additional constraints to reduce matches to a single EC2 VPC
I use the function ec2.get_vpc with id parameter only. 🦄 I don't quite understand what could be going on, since a resource ID is unique and there should be no ambiguity 😔
s

salmon-account-74572

08/05/2023, 7:31 PM
Are you able to share the code you’re using?
b

big-angle-30002

08/08/2023, 9:17 AM
Sorry, it was my mistake 😅 I passed None value into the conditional
s

salmon-account-74572

08/08/2023, 3:28 PM
No worries, glad it’s resolved!