allow ssh_host to override the host ip gathered from the instance for GCP builder

This commit is contained in:
Megan Marsh 2019-07-02 13:00:55 -07:00
parent 5ee943a2bf
commit ad8a88e366
1 changed files with 4 additions and 0 deletions

View File

@ -5,6 +5,10 @@ import (
)
func commHost(state multistep.StateBag) (string, error) {
config := state.Get("config").(*Config)
if config.Comm.SSHHost != "" {
return config.Comm.SSHHost, nil
}
ipAddress := state.Get("instance_ip").(string)
return ipAddress, nil
}