I'm new to Pulumi and I'm having trouble importing...
# google-cloud
h
I'm new to Pulumi and I'm having trouble importing an existing folder into my Pulumi stack:
Copy code
bran@danforth infra % pulumi import google-native:cloudresourcemanager/v3:Folder non_production 250711497935
Previewing import (shared):
     Type                                             Name            Plan       Info
     pulumi:pulumi:Stack                              infra-shared               1 error
 =   └─ google-native:cloudresourcemanager/v3:Folder  non_production  import     1 error

Diagnostics:
  pulumi:pulumi:Stack (infra-shared):
    error: preview failed

  google-native:cloudresourcemanager/v3:Folder (non_production):
    error: Preview failed: property "foldersId"/"name" not found
Whats the right incantation here or is this a bug?
e
Looks like it’s complaining about the format of the last argument in that call
I haven’t used cloudresourcemanager in pulumi yet but let me check if I can find the right one for you, one sec
Well, I don’t have that in my project, but I’m assuming you just need to find out what the name of your folder is and add that so your command looks like
pulumi import google-native:cloudresourcemanager/v3:Folder non_production 250711497935/{{name}}
h
Hm, doesn't seem to work for me
Copy code
bran@danforth infra % pulumi import google-native:cloudresourcemanager/v3:Folder non_production '250711497935/Non-Production'
Previewing import (shared):
     Type                                             Name            Plan       Info
     pulumi:pulumi:Stack                              infra-shared               1 error
 =   └─ google-native:cloudresourcemanager/v3:Folder  non_production  import     1 error

Diagnostics:
  pulumi:pulumi:Stack (infra-shared):
    error: preview failed

  google-native:cloudresourcemanager/v3:Folder (non_production):
    error: Preview failed: property "foldersId"/"name" not found
e
I don’t think you need the single quotes around the last bit, not sure if that makes a difference though
h
Yeah the quotes get evaluated by the shell before it gets to the pulumi process.
👍 1
e
Got no idea what might be wrong then, sorry. 🤷
h
was able to get this to work with the pulumi_gcp (classic) package
🙌 1