github.phpd.cn/hashicorp/packer@v1.3.2/builder/googlecompute/winrm.go (about) 1 package googlecompute 2 3 import ( 4 "github.com/hashicorp/packer/helper/communicator" 5 "github.com/hashicorp/packer/helper/multistep" 6 ) 7 8 // winrmConfig returns the WinRM configuration. 9 func winrmConfig(state multistep.StateBag) (*communicator.WinRMConfig, error) { 10 config := state.Get("config").(*Config) 11 password := state.Get("winrm_password").(string) 12 13 return &communicator.WinRMConfig{ 14 Username: config.Comm.WinRMUser, 15 Password: password, 16 }, nil 17 }