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

acceptable-army-69872

10/17/2019, 2:39 PM
I'm having trouble using getVpcPeeringConnection as a datasource. I'm trying to pass in an array of awsx.Vpcs, and then loop thru them, looking for any peering connections in the VPC, and then creating the route between every VPC that's peered. The routes code is not where it needs to be, but my issue is using getVpcPeeringConnection. It always seems to trigger the catch instead of returning. My typescript is weak, so maybe it's a language thing, but I don't know. Anyone have any thoughts on a better (or the right way to do this)? https://gist.github.com/packplusplus/8cb354760e6b6e1631a4023b9eb761ee
g

gentle-diamond-70147

10/17/2019, 4:32 PM
First thing I would try is running with
--debug
to see if your datasource filter/query is what you expect.
a

acceptable-army-69872

10/17/2019, 6:57 PM
i decided to go a different way for this solution, but i'd love to figure out why this code didn't work, just to understand datasources more.