Merge pull request #3752 from tarrall/issue3751-ssh-privateip-classic

builder/amazon: Honor ssh_private_ip flag in EC2-Classic, not just VPC
This commit is contained in:
Rickard von Essen 2016-09-13 22:54:00 +02:00 committed by GitHub
commit 7f4bee737c
1 changed files with 2 additions and 0 deletions

View File

@ -34,6 +34,8 @@ func SSHHost(e ec2Describer, private bool) func(multistep.StateBag) (string, err
} else if i.PrivateIpAddress != nil && *i.PrivateIpAddress != "" {
host = *i.PrivateIpAddress
}
} else if private {
host = *i.PrivateIpAddress
} else if i.PublicDnsName != nil && *i.PublicDnsName != "" {
host = *i.PublicDnsName
}