https://pulumi.com logo
#general
Title
# general
m

modern-belgium-42936

09/01/2021, 12:13 PM
Trying to import infrastructure that we already deployed prior to adopting pulumi and I am having trouble importing a few ec2's. Here is the command I am running that should generate the ts file to do the final import:
pulumi import aws:ec2/instance:Instance github-runner-1 <instance-id>
I am met with the error:
Copy code
Previewing import (dev)

View Live: <https://app.pulumi.com/lwooden/github-runners/dev/previews/d953777e-c02b-4d34-8718-8382479da9e1>

     Type                 Name                Plan       Info
 +   pulumi:pulumi:Stack  github-runners-dev  create     1 error
 =   └─ aws:ec2:Instance  github-runner-1     import     4 errors
 
Diagnostics:
  pulumi:pulumi:Stack (github-runners-dev):
    error: preview failed
 
  aws:ec2:Instance (github-runner-1):
    error: aws:ec2/instance:Instance resource 'github-runner-1' has a problem: AtLeastOne: "launch_template": one of `ami,instance_type,launch_template` must be specified. Examine values at 'Instance.LaunchTemplate'.
    error: aws:ec2/instance:Instance resource 'github-runner-1' has a problem: AtLeastOne: "ami": one of `ami,launch_template` must be specified. Examine values at 'Instance.Ami'.
    error: aws:ec2/instance:Instance resource 'github-runner-1' has a problem: AtLeastOne: "instance_type": one of `instance_type,launch_template` must be specified. Examine values at 'Instance.InstanceType'.
    error: Preview failed: one or more inputs failed to validate
doing a describe instance clearly shows that all of the fields (ami, instance_type, etc) exists for these resources so I am at a lost as to why pulumi is having issue picking them up 😞 Any pointers would be great. I've exhausted the documentation and have spent hours on this
b

bored-activity-40468

10/23/2021, 1:28 AM
Did you ever figure this out? I'm having the same problem.