Allow to define "host", "portNumber", "localPortNumber" during port forwarding session
Hello,
first of all ecsgo is a great tool and really improves quality of (engineer) life a lot :)
I wonder if it would be possible to allow specifying all 3 values after the selection of specific container. This way one could use ecsgo --forward to also tunnel via the container to a database instance which is only accessible to the container itself. So basically using the container as a jumphost.
Something like this works very well:
aws ssm start-session --target ecs:<cluster>_<taskId>_<runtimeId> --document-name AWS-StartPortForwardingSessionToRemoteHost --parameters '{"host":["my-postgres-database.internal"],"portNumber":["5432"], "localPortNumber":["5432"]}'
Hey @otbe! Thank you so much! and thank you for opening this issue (suggestion) 😄
Perhaps a --remote option which specifies that this is a remote-forward session? As well as accompanying --remote-host and --remote-port options.
If --remote is a blank value, then we can prompt the user for the remote-host and remote-port after selecting the task (this is the same way we do it for --forward if --local-port is not specified)
Let me know your thoughts!
Sounds like a really good way to implement this 👍