From 448a6a1b48c17900afd91c1fc61c984571b95917 Mon Sep 17 00:00:00 2001 From: Paul Hinze Date: Fri, 10 Jul 2015 12:53:06 -0600 Subject: [PATCH] communicator/ssh: print ssh bastion host details to output --- communicator/ssh/communicator.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/communicator/ssh/communicator.go b/communicator/ssh/communicator.go index 672dc78af..1803b85e6 100644 --- a/communicator/ssh/communicator.go +++ b/communicator/ssh/communicator.go @@ -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")