Re: Resource adoption - this is something that can...
# general
w
Re: Resource adoption - this is something that can be done with some slightly arduous work today, but which we intend to make much simpler in the very near future. https://github.com/pulumi/pulumi/issues/1662 is tracking this generally.
@microscopic-florist-22719 may be able to add more details on that issue - but the general flow for accomplishing this today is roughly: 1. Use
.get
methods and do a deployment to read the resource into the checkpoint file. 2. They will have a bit set on them that they are managed externally - manually modify the checkpoint to remove that bit (`pulumi stack export`/`pulumi stack import`) 3. Change the code to use
new Resource()
instead, but with the same name as the previous
.get()
. 4. Run a
pulumi preview
to see what changes are proposed - this should look like a no-op if you got the arguments to step (3) right. 5. Now the resource is being managed by the Pulumi code, and changes to the Pulumi code will cause updates to the resource. As discussed in 1662, we want this to be much smoother in the near future.
c
Cc @glamorous-printer-66548 :)
👍 1