communicator/ssh: print ssh bastion host details to output

This commit is contained in:
Paul Hinze 2015-07-10 12:53:06 -06:00
parent 03cbb52dac
commit 448a6a1b48
1 changed files with 15 additions and 0 deletions

View File

@ -96,6 +96,21 @@ func (c *Communicator) Connect(o terraform.UIOutput) (err error) {
c.connInfo.KeyFile != "",
c.connInfo.Agent,
))
if c.connInfo.BastionHost != "" {
o.Output(fmt.Sprintf(
"Using configured bastion host..."+
" Host: %s\n"+
" User: %s\n"+
" Password: %t\n"+
" Private key: %t\n"+
" SSH Agent: %t",
c.connInfo.BastionHost, c.connInfo.BastionUser,
c.connInfo.BastionPassword != "",
c.connInfo.BastionKeyFile != "",
c.connInfo.Agent,
))
}
}
log.Printf("connecting to TCP connection for SSH")