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

colossal-quill-8119

12/27/2023, 10:08 AM
I messed up big time. I created a GCP project with pulumi and now I can’t remove the project from pulumi code since there are multiple resources that depend on it
d

dry-keyboard-94795

12/27/2023, 12:16 PM
Are you trying to delete the project, or just drop it from code?
c

colossal-quill-8119

12/27/2023, 12:16 PM
just trying to drop it from code
d

dry-keyboard-94795

12/27/2023, 12:17 PM
Easiest way would be to set the project name in config or hardcoded, and update any resources to reference the string instead. This shouldn't trigger recreations in pulumi for the next
up
. Once that's done, you'll be able to remove the project in code. Be sure to set retain_on_delete: https://www.pulumi.com/docs/concepts/options/retainondelete/
You need to set retain_on_delete, then up, then delete the code
c

colossal-quill-8119

12/27/2023, 12:20 PM
What about the child resources that depend on it?
d

dry-keyboard-94795

12/27/2023, 12:21 PM
The child resources need to switch to using a hard coded string instead of depending on the project resource