Alternatively/also, some kind of --output <filename> format would be useful to write the outputted variables to a file, so they can easily be picked up and sourced by folks who need the variables set in their environments, or for third-party tooling to read and use them. It's not currently easy to do this without a lot of text manipulation and shell scripting, and even then the experience is a little rough.
What would you like Teleport to do?
Support an
--exec
flag totsh proxy aws
to launch a new shell with the environment variables already set - similar to what https://github.com/gravitational/teleport/pull/40246 introduced fortsh proxy kube
.Alternatively/also, some kind of
--output <filename>
format would be useful to write the outputted variables to a file, so they can easily be picked up andsource
d by folks who need the variables set in their environments, or for third-party tooling to read and use them. It's not currently easy to do this without a lot of text manipulation and shell scripting, and even then the experience is a little rough.Related issue (feature request for JSON output format): https://github.com/gravitational/teleport/issues/39341
What problem does this solve?
Makes using
tsh proxy aws
(and thus AWS console access via Teleport) more usable and intuitive.If a workaround exists, please include it.
Manually script something to run the proxy in the background, write the outputted variables to a file, trim whitespace, evaluate them etc... not fun.