Thanks for the hints but it doesn't seem that the getter can be mocked within the
call
function of the mocks. I logged
args.token
of all invokations to the console and none of them where matching but I still had this error message.
Copy code
[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "Error: failed to read resource #undefined 'default' [aws:ec2/securityGroup:SecurityGroup]: req.getCustom is not a function".] {
code: 'ERR_UNHANDLED_REJECTION'
}
Anyway I considered that I do not need to export the whole
securityGroup
just the
securityGroupId
that I already got from the VPC so problem solved. 🙂
No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.