green-bird-4706
09/28/2022, 12:35 AMtf2pulumi
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 tfstate
to import resources. I have tried to emulate that, I have this resources.json
file:
{
"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
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 403
error when I run the pulumi plugin install
. I have tried removing the node_modules
folder and using yarn
, using Pulumi 3.38.0
and Pulumi 3.40.2
. I am running:
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
Description: Ubuntu 20.04.5 LTS
Release: 20.04
Codename: focal
But it has the exact same issue. I am currently running v14.19.1
Thanks in advance for any help. I have searched this Slack channel and stack overflow but haven't found anything that will help.little-cartoon-10569
09/28/2022, 12:52 AMgreen-bird-4706
09/28/2022, 1:00 AMtype
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:
error: Preview failed: unrecognized resource type (Read): aws:Lambda:Function
So the type field would still seem incorrect.little-cartoon-10569
09/28/2022, 1:05 AM<module>.__pulumiType
. For example, aws/lambda/function.js says that the type is aws:lambda/function:Function
.green-bird-4706
09/28/2022, 1:14 AM