Hi everyone, I have a small existing project manag...
# typescript
Hi everyone, I have a small existing project managed by Terragrunt/Terraform I am trying to migrate to Pulumi. I have tried to migrate us
but it doesn't support Terraform modules which we rely on heavily, so I abandoned that. I found a video on youtube of a livestream (


) that uses
to import resources. I have tried to emulate that, I have this
Copy code
  "resources": [
      "name": "lambda",
      "type": "AWS::Lambda::Function",
      "id": "ingestDataLambda"
Which I just scraped out with JS. It was longer but I cut it down to importing one resource for simplicity. When I run
pulumi import -f resources.json --out index.ts
I get an error
Copy code
error: preview failed: failed to validate provider config: Could not automatically download and install resource plugin 'pulumi-resource-AWS'at version v5.16.0, install the plugin using `pulumi plugin install resource AWS v5.16.0`.
    Underlying error: error downloading plugin AWS to file: failed to download plugin: AWS-5.16.0: 403 HTTP error fetching plugin from <https://get.pulumi.com/releases/plugins/pulumi-resource-AWS-v5.16.0-linux-amd64.tar.gz>
I also get a
error when I run the
pulumi plugin install
. I have tried removing the
folder and using
, using
Pulumi 3.38.0
Pulumi 3.40.2
. I am running:
Copy code
Description:    Debian GNU/Linux 9.13 (stretch)
Release:        9.13
Codename:       stretch
Inside Windows 11 WSL2. I have managed to deploy a simple S3 bucket to the AWS account so the Pulumi setup works, it just doesn't want to import for me. I have also tried reinstalling Pulumi on
Copy code
Description:    Ubuntu 20.04.5 LTS
Release:        20.04
Codename:       focal
But it has the exact same issue. I am currently running
Thanks in advance for any help. I have searched this Slack channel and stack overflow but haven't found anything that will help.
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"?
Thanks, that's fixed that error. I get a different error, I think the
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.
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
. For example, aws/lambda/function.js says that the type is
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.
👍 1