Looks like there's a case-sensitivity problem. The AWS plugin is called pulumi-resource-aws, not pulumi-resource-AWS. Maybe try changing the type to begin with "aws"?
g
green-bird-4706
09/28/2022, 1:00 AM
Thanks, that's fixed that error. I get a different error, I think the
type
field might still be wrong. Does
"type": "aws::Lambda::Function"
look correct - is there documentation on what the type fields should be. Terraform gave me
_
instead of
::
and I deduced the type from the AWS console.
The error I get is:
Copy code
error: Preview failed: unrecognized resource type (Read): aws:Lambda:Function
So the type field would still seem incorrect.
l
little-cartoon-10569
09/28/2022, 1:05 AM
If it's a Pulumi type, then yes, it's wrong. Maybe those are Terraform types? To find a Pulumi type, you can look in the approppriate module: they're always at the bottom of the .js file, called
<module>.__pulumiType
. For example, aws/lambda/function.js says that the type is
aws:lambda/function:Function
.
g
green-bird-4706
09/28/2022, 1:14 AM
I've found that now inside the node modules. And that has imported successfully. 🎉 I can go and work out the other 20 resources now and import them now. Thanks so much for your help, I never found anything close to what the issue was.
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.