pulumi / examples

Infrastructure, containers, and serverless apps to AWS, Azure, GCP, and Kubernetes... all deployed with Pulumi
https://www.pulumi.com
Apache License 2.0
2.39k stars 881 forks source link

aws-ts-ec2-provisioners: no resource plugin 'pulumi-nodejs' found #1076

Open jacksgt opened 3 years ago

jacksgt commented 3 years ago

Hi there,

I'm running Pulumi 3.11.0 with the Typescript environment. I'm encountering the following error when trying to reproduce the aws-ts-ec2-provisioners example:

  pulumi:providers:pulumi-nodejs (default):
    error: no resource plugin 'pulumi-nodejs' found in the workspace or on your $PATH

Steps to reproduce

Setup:

mkdir virtual_machine && cd virtual_machine
pulumi new https://github.com/pulumi/examples/tree/master/aws-ts-ec2-provisioners
cat ~/.ssh/id_ed25519.pub | pulumi config set publicKey --
cat ~/.ssh/id_ed25519 | pulumi config set privateKey --secret --
pulumi config set aws:region us-west-2
export AWS_PROFILE=pulumi
yarn install

Error:

$ pulumi up
Previewing update (test-dev):
     Type                               Name                              Plan       Info
 +   pulumi:pulumi:Stack                aws-ts-ec2-provisioners-test-dev  create     
 +   ├─ aws:ec2:SecurityGroup           secgrp                            create     
 +   ├─ aws:ec2:KeyPair                 key                               create     
 +   ├─ aws:ec2:Instance                server                            create     
 +   ├─ pulumi:provisioners:CopyFile    config                            create     
     └─ pulumi:providers:pulumi-nodejs  default                                      1 error

Diagnostics:
  pulumi:providers:pulumi-nodejs (default):
    error: no resource plugin 'pulumi-nodejs' found in the workspace or on your $PATH

$ pulumi up -d
Previewing update (test-dev):
     Type                               Name                              Plan       Info
 +   pulumi:pulumi:Stack                aws-ts-ec2-provisioners-test-dev  create     50 debugs
 +   ├─ aws:ec2:KeyPair                 key                               create     
 +   ├─ aws:ec2:SecurityGroup           secgrp                            create     
 +   ├─ aws:ec2:Instance                server                            create     
 +   ├─ pulumi:provisioners:CopyFile    config                            create     
     └─ pulumi:providers:pulumi-nodejs  default                                      1 error

Diagnostics:
  pulumi:pulumi:Stack (aws-ts-ec2-provisioners-test-dev):
    debug: Registering resource: t=pulumi:pulumi:Stack, name=aws-ts-ec2-provisioners-test-dev, custom=false, remote=false
    debug: RegisterResource RPC prepared: t=pulumi:pulumi:Stack, name=aws-ts-ec2-provisioners-test-dev
    debug: RegisterResource RPC finished: resource:aws-ts-ec2-provisioners-test-dev[pulumi:pulumi:Stack]; err: null, resp: urn:pulumi:test-dev::aws-ts-ec2-provisioners::pulumi:pulumi:Stack::aws-ts-ec2-provisioners-test-dev,,,,
    debug: Running program '/home/jack/git/virtual_machine' in pwd '/home/jack/git/virtual_machine' w/ args: 
    debug: Registering resource: t=aws:ec2/securityGroup:SecurityGroup, name=secgrp, custom=true, remote=false
    debug: Invoking function: tok=aws:ec2/getAmi:getAmi asynchronously
    debug: Registering resource: t=aws:ec2/keyPair:KeyPair, name=key, custom=true, remote=false
    debug: Registering resource: t=aws:ec2/instance:Instance, name=server, custom=true, remote=false
    debug: Registering resource: t=pulumi:provisioners:CopyFile, name=config, custom=false, remote=false
    debug: Registering resource: t=pulumi-nodejs:dynamic:Resource, name=config-provisioner, custom=true, remote=false
    debug: Registering resource: t=pulumi:provisioners:RemoteExec, name=cat-config, custom=false, remote=false
    debug: Registering resource: t=pulumi-nodejs:dynamic:Resource, name=cat-config-provisioner, custom=true, remote=false
    debug: , obj={"filters":[{"name":"name","values":["amzn2-ami-hvm-2.0.????????-x86_64-gp2"]}],"mostRecent":true,"owners":["amazon"]}
    debug: Found free variables: {"required":{},"optional":{}}
    debug: Found free variables: {"required":{},"optional":{}}
    debug: Found free variables: {"required":{},"optional":{}}
    debug: Found free variables: {"required":{},"optional":{}}
    debug: Found free variables: {"required":{},"optional":{}}
    debug: Found free variables: {"required":{},"optional":{}}
    debug: Found free variables: {"required":{},"optional":{}}
    debug: Found free variables: {"required":{},"optional":{}}
    debug: Found free variables: {"required":{},"optional":{}}
    debug: Found free variables: {"required":{},"optional":{}}
    debug: Found free variables: {"required":{},"optional":{}}
    debug: Found free variables: {"required":{},"optional":{}}
    debug: Found free variables: {"required":{},"optional":{}}
    debug: Found free variables: {"required":{},"optional":{}}
    debug: Found free variables: {"required":{},"optional":{}}
    debug: RegisterResource RPC prepared: t=aws:ec2/securityGroup:SecurityGroup, name=secgrp
    debug: RegisterResource RPC prepared: t=aws:ec2/keyPair:KeyPair, name=key
    debug: AWS Auth provider used: "SharedCredentialsProvider"
    debug: AWS Auth provider used: "SharedCredentialsProvider"
    debug: Trying to get account information via iam:GetUser
    debug: Trying to get account information via sts:GetCallerIdentity
    debug: Truncating attribute path of 0 diagnostics for TypeSet
    debug: Reading AMI: {
    debug:   Filters: [{
    debug:       Name: "name",
    debug:       Values: ["amzn2-ami-hvm-2.0.????????-x86_64-gp2"]
    debug: RegisterResource RPC finished: resource:key[aws:ec2/keyPair:KeyPair]; err: null, resp: urn:pulumi:test-dev::aws-ts-ec2-provisioners::aws:ec2/keyPair:KeyPair::key,,id,,,,keyName,,,key-f8c29d0,publicKey,,,REDACTED,,
    debug: RegisterResource RPC finished: resource:secgrp[aws:ec2/securityGroup:SecurityGroup]; err: null, resp: urn:pulumi:test-dev::aws-ts-ec2-provisioners::aws:ec2/securityGroup:SecurityGroup::secgrp,,description,,,Foo,id,,,,ingress,,,,,,,,,,cidrBlocks,,,,,,,,0.0.0.0/0,description,,,,fromPort,,80,ipv6CidrBlocks,,,,,,,prefixListIds,,,,,,,protocol,,,tcp,securityGroups,,,,,,,self,,,,false,toPort,,80,,,,,cidrBlocks,,,,,,,,0.0.0.0/0,description,,,,fromPort,,22,ipv6CidrBlocks,,,,,,,prefixListIds,,,,,,,protocol,,,tcp,securityGroups,,,,,,,self,,,,false,toPort,,22,name,,,secgrp-7f8fe35,revokeRulesOnDelete,,,,false,,
    debug: Invoke RPC finished: tok=aws:ec2/getAmi:getAmi; err: null, resp: architecture,,,x86_64,arn,,,arn:aws:ec2:us-west-2::image/ami-082b5a644766e0e6f,blockDeviceMappings,,,,,,,,,,deviceName,,,/dev/xvda,ebs,,,,,delete_on_termination,,,true,encrypted,,,false,iops,,,0,snapshot_id,,,snap-058815b9d9b9d4944,throughput,,,0,volume_size,,,8,volume_type,,,gp2,noDevice,,,,virtualName,,,,creationDate,,,2019-06-19T21:59:14.000Z,description,,,Amazon Linux 2 AMI 2.0.20190618 x86_64 HVM gp2,enaSupport,,,,true,filters,,,,,,,,,,name,,,name,values,,,,,,,,amzn2-ami-hvm-2.0.????????-x86_64-gp2,hypervisor,,,xen,id,,,ami-082b5a644766e0e6f,imageId,,,ami-082b5a644766e0e6f,imageLocation,,,amazon/amzn2-ami-hvm-2.0.20190618-x86_64-gp2,imageOwnerAlias,,,amazon,imageType,,,machine,mostRecent,,,,true,name,,,amzn2-ami-hvm-2.0.20190618-x86_64-gp2,ownerId,,,137112412989,owners,,,,,,,,amazon,platformDetails,,,Linux/UNIX,productCodes,,,,,,,public,,,,true,rootDeviceName,,,/dev/xvda,rootDeviceType,,,ebs,rootSnapshotId,,,snap-058815b9d9b9d4944,sriovNetSupport,,,simple,state,,,available,stateReason,,,,,code,,,UNSET,message,,,UNSET,tags,,,,,,usageOperation,,,RunInstances,virtualizationType,,,hvm,
    debug: RegisterResource RPC prepared: t=aws:ec2/instance:Instance, name=server
    debug: RegisterResource RPC finished: resource:server[aws:ec2/instance:Instance]; err: null, resp: urn:pulumi:test-dev::aws-ts-ec2-provisioners::aws:ec2/instance:Instance::server,,ami,,,ami-082b5a644766e0e6f,getPasswordData,,,,false,id,,,,instanceType,,,t2.micro,keyName,,,key-f8c29d0,sourceDestCheck,,,,true,,
    debug: RegisterResource RPC prepared: t=pulumi:provisioners:CopyFile, name=config
    debug: RegisterResource RPC finished: resource:config[pulumi:provisioners:CopyFile]; err: null, resp: urn:pulumi:test-dev::aws-ts-ec2-provisioners::pulumi:provisioners:CopyFile::config,,,,
    debug: RegisterResourceOutputs RPC prepared: urn=urn:pulumi:test-dev::aws-ts-ec2-provisioners::pulumi:provisioners:CopyFile::config
    debug: RegisterResource RPC prepared: t=pulumi-nodejs:dynamic:Resource, name=config-provisioner
    debug: RegisterResourceOutputs RPC finished: urn=urn:pulumi:test-dev::aws-ts-ec2-provisioners::pulumi:provisioners:CopyFile::config; err: null, resp: 
    debug: RegisterResourceOutputs RPC finished: urn=urn:pulumi:test-dev::aws-ts-ec2-provisioners::pulumi:provisioners:CopyFile::config; err: null, resp: 

  pulumi:providers:pulumi-nodejs (default):
    error: no resource plugin 'pulumi-nodejs' found in the workspace or on your $PATH

Environment:

$ pulumi version
3.11.0
$ pulumi plugin ls                                                                                                                              
NAME    KIND      VERSION  SIZE    INSTALLED  LAST USED
aws     resource  4.20.0   280 MB  n/a        26 minutes ago
hcloud  resource  1.5.0    41 MB   n/a        5 days ago

TOTAL plugin cache size: 321 MB
$ node --version
v14.17.4
$ which pulumi
/usr/bin/pulumi
$ which pulumi-language-nodejs
/usr/bin/pulumi-language-nodejs

Please indicate how I can further debug this issue.

stack72 commented 3 years ago

Hi @jacksgt

I am presuming that /usr/bin is on your $PATH right?

P.

jacksgt commented 3 years ago

Hi, thanks for getting back to me. Yes, as the which pulumi output shows, the pulumi binary (as well as pulumi-language-nodejs) are in the $PATH:

$ echo $PATH 
/home/jack/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
$ which pulumi 
/usr/bin/pulumi
$ which pulumi-language-nodejs  
/usr/bin/pulumi-language-nodejs