Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to define "host", "portNumber", "localPortNumber" during port forwarding session #54

Open
otbe opened this issue Oct 15, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@otbe
Copy link

otbe commented Oct 15, 2024

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"]}'
@tedsmitt tedsmitt added the enhancement New feature or request label Oct 15, 2024
@tedsmitt
Copy link
Owner

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!

@otbe
Copy link
Author

otbe commented Oct 16, 2024

Sounds like a really good way to implement this 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants