mirror of
https://github.com/hashicorp/packer.git
synced 2026-09-23 08:21:43 -04:00
18 lines
442 B
Go
18 lines
442 B
Go
package googlecompute
|
|||
|
|
|
||
|
|
import (
|
||
|
|
"github.com/mitchellh/multistep"
|
||
|
|
"github.com/mitchellh/packer/helper/communicator"
|
||
|
|
)
|
||
|
|
|
||
|
|
// 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
|
||
|
|
}
|