This message was deleted.
# general
s
This message was deleted.
w
After adding the
skipReassignOwned
setting did you do a
pulumi up
to update the state? If not, do that and then try the
pulumi destroy
r
I did it and saw it in the diff, this didn't help. I just tried with
skipDropRole
and this worked. But this is not really deleting the role so in other scenarios it might not behave as expected.
Additionally, am I missing an obvious way to execute a
REASSIGN
on the role's objects?
w
Unfortunately, I’m not familiar with Postgres and roles and so don’t know what the best way to do this is.
And I may be speaking out of context here, but would it not be a matter of updating a
Grant
resource?
r
Yeah this sounds like it, this would require some manual steps it seems. I can't find anything like this:
(pseudo code) "on delete: REASSIGN OWNED BY foo TO bar"
Which would solve my problem and enable me to drop the role without tweaking the code. For a complete drop database/stack operation it seems that SkipDropRole (not dropping the role at all and nuking the database) is the way to go. Brb setting some backups 😄
w
The Pulumi model is that your program declares your desired state. So, it’s naturally going to be a “manual” step to change that desired state. That said, using multiple stacks and stack references and/or the automation API may enable you to achieve what you are wanting to do. Again, I’m not 100% I’m understanding the use-case.
r
Yeah I think that at the point where im deleting stuff I should assume that the old state is just gone.