github.com/mitchellh/packer@v1.3.2/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 "github.com/hashicorp/packer/packer" 9 ) 10 11 type StepSaveWinRMPassword struct { 12 Password string 13 BuildName string 14 } 15 16 func (s *StepSaveWinRMPassword) Run(_ context.Context, state multistep.StateBag) multistep.StepAction { 17 // store so that we can access this later during provisioning 18 commonhelper.SetSharedState("winrm_password", s.Password, s.BuildName) 19 packer.LogSecretFilter.Set(s.Password) 20 return multistep.ActionContinue 21 } 22 23 func (s *StepSaveWinRMPassword) Cleanup(multistep.StateBag) { 24 commonhelper.RemoveSharedStateFile("winrm_password", s.BuildName) 25 }