https://pulumi.com logo
b

big-london-74366

08/30/2021, 3:40 AM
I want to keep my RDS instance when I destroyed my pulumi changes. I imported my RDS (no problem with that). But whenever I finished my tutorial/experiment, I'd like to destroy everything except for the RDS. Right now, I'm using
Copy code
pulumi state delete urn:pulumi:production::blog::aws:rds/instance:Instance::blog
After that, I'll uncomment the code rds code and run
pulumi destroy
Is that the way to do this or there's a better way to achieve this?
l

little-cartoon-10569

08/30/2021, 3:48 AM
I don't think so. If you use
protect: true
then it prevents the destory, iirc. You need to remove it from the state to leave it after a destroy.
⬆️ 1
You could alternatively comment out all the other code, run
up
, then
pulumi stack rm
.