mirror of
https://github.com/hashicorp/packer.git
synced 2026-05-28 04:35:38 -04:00
allow ssh_host to override the host ip gathered from the instance for GCP builder
This commit is contained in:
parent
5ee943a2bf
commit
ad8a88e366
1 changed files with 4 additions and 0 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue