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

dry-keyboard-94795

08/24/2023, 12:21 PM
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

billowy-army-68599

08/24/2023, 2:24 PM
@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

dry-keyboard-94795

08/24/2023, 2:26 PM
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