2016-09-25 22:46:52 -04:00
|
|
|
package googlecompute
|
|
|
|
|
|
|
|
import (
|
2017-04-04 16:39:01 -04:00
|
|
|
"github.com/hashicorp/packer/helper/communicator"
|
2018-01-19 19:18:44 -05:00
|
|
|
"github.com/hashicorp/packer/helper/multistep"
|
2016-09-25 22:46:52 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
// winrmConfig returns the WinRM configuration.
|
|
|
|
func winrmConfig(state multistep.StateBag) (*communicator.WinRMConfig, error) {
|
|
|
|
config := state.Get("config").(*Config)
|
|
|
|
password := state.Get("winrm_password").(string)
|
|
|
|
|
|
|
|
return &communicator.WinRMConfig{
|
|
|
|
Username: config.Comm.WinRMUser,
|
|
|
|
Password: password,
|
|
|
|
}, nil
|
|
|
|
}
|