Hello, I'm having this issue with local.Command, w...
# getting-started
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).
Could you have the destroy run a script that also fetches updated transient credentials first?
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.