high-grass-3103
08/16/2025, 9:05 AMssh
for each resource change, right?echoing-dinner-19531
08/18/2025, 7:12 AMlively-crayon-44649
08/18/2025, 9:48 AMlively-crayon-44649
08/18/2025, 9:49 AMlet tunnel: ChildProcessWithPidOrWhateverIForgetTheExactTypeName
function openTunnel() {
if (tunnel) {
return tunnel
}
// try/catch etc. might be useful
tunnel = spawnSync("ssh", ...)
return tunnel
}
function closeTunnel() {
tunnel?.kill(SIGKILL) // etc.
}
const x = new Resource("x", ..., { hooks: { beforeCreate: [openTunnel], ... } })
lively-crayon-44649
08/18/2025, 9:50 AMlively-crayon-44649
08/18/2025, 9:50 AMhigh-grass-3103
08/19/2025, 7:56 PMBASTION=true pulumi up
which starts it, uses to create any resources from command
module, and then pulumi up
which destroys the bastion
I could also use something similar for kubectl port-forward
echoing-dinner-19531
08/19/2025, 9:21 PMperhaps it should be explicitly supported by pulumi?Yeh I've thought about this. I don't think it would be that tricky to support if needed, the main thing is working out the lifecycle for deletes. It's easy if we just say temporarys get deleted at the end, but if we need smaller lifetimes than the whole program that gets tricky.