mirror of
https://github.com/hashicorp/packer.git
synced 2026-09-21 15:31:41 -04:00
allow ssh_host to override the host ip gathered from the instance for GCP builder
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user