From e711255d95d8ddd2504f89a4a6702fda145b1f1e Mon Sep 17 00:00:00 2001 From: Nathan Sullivan Date: Tue, 26 Nov 2013 15:03:45 +1000 Subject: [PATCH] fix some debugging for PublicIpAddress --- builder/amazon/common/step_run_source_instance.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/builder/amazon/common/step_run_source_instance.go b/builder/amazon/common/step_run_source_instance.go index 87110130b..77d330a21 100644 --- a/builder/amazon/common/step_run_source_instance.go +++ b/builder/amazon/common/step_run_source_instance.go @@ -110,13 +110,16 @@ func (s *StepRunSourceInstance) Run(state multistep.StateBag) multistep.StepActi } s.instance = latestInstance.(*ec2.Instance) - log.Printf("Public IP: %s", s.instance.PublicIpAddress) if s.Debug { if s.instance.DNSName != "" { ui.Message(fmt.Sprintf("Public DNS: %s", s.instance.DNSName)) } + if s.instance.PublicIpAddress != "" { + ui.Message(fmt.Sprintf("Public IP: %s", s.instance.PublicIpAddress)) + } + if s.instance.PrivateIpAddress != "" { ui.Message(fmt.Sprintf("Private IP: %s", s.instance.PrivateIpAddress)) }