mirror of
https://github.com/hashicorp/packer.git
synced 2026-09-22 16:01:43 -04:00
15 lines
324 B
Go
15 lines
324 B
Go
package googlecompute
|
|
|
|
import (
|
|
"github.com/hashicorp/packer/helper/multistep"
|
|
)
|
|
|
|
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
|
|
}
|