You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
packer/builder/googlecompute/ssh.go

15 lines
324 B

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
}