teleport
teleport copied to clipboard
Automatically enable tunnel for "tsh proxy db"
changelog: automatically enables "--tunnel" for "tsh proxy db" when local tunnel is required
before:
$ tsh proxy db dynamo-table-a --db-user steve-poweruser
ERROR: "tsh proxy db" is not supported when:
- database protocol is DynamoDB.
Please use the following command to connect to the database:
tsh proxy db --tunnel dynamo-table-a
after:
$ tsh proxy db dynamo-table-a --db-user steve-poweruser -p 8888
Note: "--tunnel" flag has been automatically enabled when:
- database protocol is DynamoDB.
To avoid this note, please add the "--tunnel" flag to this "tsh proxy db" command.
Started authenticated tunnel for the DynamoDB database "dynamo-table-a" in cluster "teleport.dev.aws.stevexin.me" on 127.0.0.1:8888.
@GavinFrazar what's your thought on this?
@GavinFrazar what's your thought on this?
I think it's a good change since the logic of it is relatively simple and nothing too magical. I would reword the message slightly though, what do you think?
$ tsh proxy db dynamo-table-a --db-user steve-poweruser -p 8888
Note: An authenticated tunnel has been enabled automatically due to the following:
- database protocol is DynamoDB.
To avoid seeing this note add the "--tunnel" flag to "tsh proxy db".
Started authenticated tunnel for the DynamoDB database "dynamo-table-a" in cluster "teleport.dev.aws.stevexin.me" on 127.0.0.1:8888.