I just read that OpenTofu introduces ephemeral res...
# general
h
I just read that OpenTofu introduces ephemeral resources, which is great because I was gonna ask for it in pulimi. I could use ephemeral resources to • spin up a bastion node (Server resource) • set up a ssh tunnel (that would require a new Process resource, for running processes, as opposed to LocalCommand) • or set up a kubernetes port-forward (also a Process resource) to manage other services, for example a database Unlike hooks, these resources would be also required at refresh
e
Its an area we've looked at. Once we've got a bit more stability on people running programs with refreshes (i.e. --run-program) I think it should be possible to add ephemeral resources to pulumi as well.
šŸŽ‰ 1
l
> Unlike hooks, these resources would be also required at refresh Hooks work at refresh (and destroy) if you are passing
--run-program
, and you can use hooks for these kinds of things (or failing that, the Automation API, which I've used with e.g. AWS SSM tunnels in the past). Not to say that ephemeral resources aren't independently useful of course!
h
OK, I didn't know about --run-program until now. if I use port-forward to create a persistent queue in a broker, or a create schema+user in a DB, than stacks for every such service/app would need to be wrapped in a script to start port-forward and do
pulumi up
.
l
Indeed -- as I say, I've had success with the automation API here. If it's limited to a single resource, you might find hooks are appropriate (saving the hassle of going "full automation API"), but again I'm not an expert on ephemeral resources so don't want to suggest the story is complete in Pulumi yet šŸ˜…
h
I think I'd rather break the microstacks architecture and put these resources (queue/db) to a central pulumi project, so that the code to handle the ephemeral stuff is in one place.