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

ambitious-afternoon-55254

05/18/2023, 4:38 PM
Is it possible to generate code with
pulumi import
(or similar) but not modify the stack’s state? I have some resources I want to generate the pulumi code for but am not ready to move them under pulumi’s management quite yet.
m

many-television-17079

05/18/2023, 7:36 PM
A workaround I used on the past is deleting the element from the state after the import, using
pulumi state delete <resourceUrn>
.
l

little-cartoon-10569

05/18/2023, 8:31 PM
I don't think so. Another, slightly faster workaround would be to create a new stack, import to that stack, then just throw it away.
s

stocky-restaurant-98004

05/22/2023, 5:50 PM
Seems like a popular request. Upvote the issue here: https://github.com/pulumi/pulumi/issues/8836
5 Views