Hi folks, new to Pulumi and enjoying it so far, bu...
# general
i
Hi folks, new to Pulumi and enjoying it so far, but wanted to ask one thing. Say I try to create an existing resource (and ofc it fails). If the resource already exists, how can I register it to state?
e
You can either use the
import
argument or
pulumi import
. Let me find you some documentation 🙂
i
Sorry for the late reply, stuff came up.
So as far as I understand the resource has to defined explicitly, there is no option to import resource when you get an existing resource error.
e
You do that with
pulumi import
.
With that command the resource is imported to your stack, and Pulumi gives you the code for that resource (which you typically just copy)