`pulumi import` doesn't seem to work: using either...
# general
b
pulumi import
doesn't seem to work: using either the token from pulumi registry or what's seen in the preview doesn't work
1
l
Check the example here: https://www.pulumi.com/registry/packages/aws/api-docs/organizations/organizationalunit/ The syntax is
Copy code
pulumi import aws:organizations/organizationalUnit:OrganizationalUnit example ou-1234567
b
second screenshot was following the docs; not working / for some reason pulumi could not find the urn running pulumi up always tries to create the tools-ou but throws an error of Duplicate OU
l
Import doesn't use a URN, it creates one.
b
i see; so
example
should be a completely new name instead of what's defined in my pulumi code?
l
No, remember that Pulumi adds suffices to names, and names go in URNs
You have 2 choices: import without the code, then add the code (less good, imo), or don't use
pulumi import
and instead add the
import
opt to the existing code.
pulumi import
is used when you don't have the code already.
b
ah i see, interesting.
l
b
gotcha thanks!
l
Note especially the last line of that page:
Once a resource is successfully imported, remove the import option because Pulumi is now managing the resource.
👍 1
b
i hope pulumi pays you well
l
I shall never buy another t-shirt or hoodie.
😆 1