github.com/StackPointCloud/packer@v0.10.2-0.20180716202532-b28098e0f79b/builder/azure/arm/step_save_winrm_password.go (about) 1 package arm 2 3 import ( 4 "context" 5 6 commonhelper "github.com/hashicorp/packer/helper/common" 7 "github.com/hashicorp/packer/helper/multistep" 8 ) 9 10 type StepSaveWinRMPassword struct { 11 Password string 12 BuildName string 13 } 14 15 func (s *StepSaveWinRMPassword) Run(_ context.Context, state multistep.StateBag) multistep.StepAction { 16 // store so that we can access this later during provisioning 17 commonhelper.SetSharedState("winrm_password", s.Password, s.BuildName) 18 return multistep.ActionContinue 19 } 20 21 func (s *StepSaveWinRMPassword) Cleanup(multistep.StateBag) { 22 commonhelper.RemoveSharedStateFile("winrm_password", s.BuildName) 23 }