https://pulumi.com logo
#getting-started
Title
# getting-started
f

faint-wolf-82031

08/04/2023, 2:34 PM
Hello, I'm having this issue with local.Command, where I need to run clean up on destroy. The local Command depends on temporary credentials passed into the environment variables. These credentials are created from a previous local Command. The problem is that these credentials are no longer valid for the delete statement (on a destroy). I don't see a way of using transient environment variables that get refreshed no matter what, and the dependsOn works in the reverse order on a destroy (so I would be getting the credentials after the fact).
s

salmon-account-74572

08/04/2023, 3:31 PM
Could you have the destroy run a script that also fetches updated transient credentials first?
f

faint-wolf-82031

08/04/2023, 3:52 PM
Yeah, one option is to have the local command 'delete' call out to a .sh file rather than trying to run the command directly. It's sort of a pain, but definitely an option.