diff --git a/builder/amazon/common/ssh.go b/builder/amazon/common/ssh.go index 562c95658..eb87767cb 100644 --- a/builder/amazon/common/ssh.go +++ b/builder/amazon/common/ssh.go @@ -18,7 +18,7 @@ func SSHAddress(e *ec2.EC2, port int) func(map[string]interface{}) (string, erro i := state["instance"].(*ec2.Instance) if i.DNSName != "" { host = i.DNSName - } else if i.VpcId == "" { + } else if i.VpcId != "" { host = i.PrivateIpAddress }