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

billowy-horse-79629

12/21/2023, 1:09 PM
Hey all - a typical IaC / Pulumi question here 🙂 I’ve made many changes to my production Pulumi stack but unfortunately the code got deleted (Intellij crashed 😞) What’s the suggestion here to recreate this code and avoid weird and unnecessary drifts ? Thanks 💌
d

dry-keyboard-94795

12/21/2023, 1:13 PM
Is it possible the code is still around in IntelliJ's "local history" feature?
I'm not familiar with a way of generating code from an existing stack's state
Worst case sceneria, you can use
pulumi preview
to help guide you with which resources need setting up and with which attributes until you get to a point where there's no diff
h

hallowed-horse-57635

12/21/2023, 1:21 PM
Fyi that we have an option to scan an existing deployment and generate code is ts. Albeit a slightly different approach of a standard ts program and a json config file. Also a specific runner will be required to run the code without our software. If interested we can chat more. #qmcloud.io
d

dry-keyboard-94795

12/21/2023, 1:23 PM
@hallowed-horse-57635 as in it'll generate the pulumi code for you?
h

hallowed-horse-57635

12/21/2023, 1:27 PM
Ya. As mentioned a bit different but all pulumi and we use pulumi automation api in the backend. It's a no code software that generates the code for you and allows you to visualize things (besides the ability to compose for a new stack).