For doing imports where you already have code, is ...
# general
d
For doing imports where you already have code, is there a way to get the expected URN of a resource before it's created so I can write the import commands? Especially important given that ComponentResources are used
pulumi stack -u
only shows resources in state, so doesn't help
Actually, looks like I can't use the
import
command for this, because the code exists already.. 🙁
b
@dry-keyboard-94795 for existing code, you’d use the import resource option https://www.pulumi.com/docs/using-pulumi/adopting-pulumi/import/#pulumi-import-resource-operation
d
yep, got through it all, mostly through just deleting things in GCP. It's component resources made in a loop (multiple instances). Thankfully didn't have to delve into modifying the state by hand this time 🙂
+ most of the resources in there were k8s, so they just auto-import