github.com/amanya/packer@v0.12.1-0.20161117214323-902ac5ab2eb6/builder/googlecompute/winrm.go (about)

     1  package googlecompute
     2  
     3  import (
     4  	"github.com/mitchellh/multistep"
     5  	"github.com/mitchellh/packer/helper/communicator"
     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  }