@@ -79,7 +79,7 @@ func changesForApply(smgr statemanager.Manager, cfg *configloader.Config) ([]*Ch
7979
8080 if state == nil {
8181 // tool not in the state, create, no need to Read resource before Create
82- description := fmt .Sprintf ("Tool < %s > found in config but doesn't exist in the state, will be created." , tool .Name )
82+ description := fmt .Sprintf ("Tool %s (%s) found in config but doesn't exist in the state, will be created." , tool .Name , tool . Plugin . Kind )
8383 changes = append (changes , generateCreateAction (& tool , description ))
8484 } else {
8585 if err := renderRefByDependency (& tool , cfg .Tools , smgr ); err != nil {
@@ -88,7 +88,7 @@ func changesForApply(smgr statemanager.Manager, cfg *configloader.Config) ([]*Ch
8888 // tool found in the state
8989 if drifted (tool .Options , state .Options ) {
9090 // tool's config differs from State's, Update
91- description := fmt .Sprintf ("Tool < %s > config drifted from the state, will be updated." , tool .Name )
91+ description := fmt .Sprintf ("Tool %s (%s) config drifted from the state, will be updated." , tool .Name , tool . Plugin . Kind )
9292 changes = append (changes , generateUpdateAction (& tool , description ))
9393 } else {
9494 // tool's config is the same as State's
@@ -101,15 +101,15 @@ func changesForApply(smgr statemanager.Manager, cfg *configloader.Config) ([]*Ch
101101
102102 if resource == nil {
103103 // tool exists in the state, but resource doesn't exist, Create
104- description := fmt .Sprintf ("Tool < %s > state found but it seems the tool isn't created, will be created." , tool .Name )
104+ description := fmt .Sprintf ("Tool %s (%s) state found but it seems the tool isn't created, will be created." , tool .Name , tool . Plugin . Kind )
105105 changes = append (changes , generateCreateAction (& tool , description ))
106106 } else if drifted (resource , state .Resource ) {
107107 // resource drifted from state, Update
108- description := fmt .Sprintf ("Tool < %s > drifted from the state, will be updated." , tool .Name )
108+ description := fmt .Sprintf ("Tool %s (%s) drifted from the state, will be updated." , tool .Name , tool . Plugin . Kind )
109109 changes = append (changes , generateUpdateAction (& tool , description ))
110110 } else {
111111 // resource is the same as the state, do nothing
112- log .Debugf ("Tool < %s > is the same as the state, do nothing." , tool .Name )
112+ log .Debugf ("Tool %s (%s) is the same as the state, do nothing." , tool .Name , tool . Plugin . Kind )
113113 }
114114 }
115115 }
@@ -144,7 +144,7 @@ func changesForDelete(smgr statemanager.Manager, cfg *configloader.Config) []*Ch
144144 if state == nil {
145145 continue
146146 }
147- description := fmt .Sprintf ("Tool < %s > will be deleted." , tool .Name )
147+ description := fmt .Sprintf ("Tool %s (%s) will be deleted." , tool .Name , tool . Plugin . Kind )
148148 changes = append (changes , generateDeleteAction (& tool , description ))
149149 tmpStates .Delete (statemanager .StateKeyGenerateFunc (& tool ))
150150 }
@@ -160,7 +160,7 @@ func changesForForceDelete(smgr statemanager.Manager, cfg *configloader.Config)
160160
161161 for i := len (cfg .Tools ) - 1 ; i >= 0 ; i -- {
162162 tool := cfg .Tools [i ]
163- description := fmt .Sprintf ("Tool < %s > will be deleted." , tool .Name )
163+ description := fmt .Sprintf ("Tool %s (%s) will be deleted." , tool .Name , tool . Plugin . Kind )
164164 changes = append (changes , generateDeleteAction (& tool , description ))
165165 if err := smgr .DeleteState (statemanager .StateKeyGenerateFunc (& tool )); err != nil {
166166 log .Errorf ("Failed to delete %s from state." , statemanager .StateKeyGenerateFunc (& tool ))
@@ -178,7 +178,7 @@ func renderRefByDependency(tool *configloader.Tool, tools []configloader.Tool, s
178178 for _ , dependency := range tool .DependsOn {
179179 dependencyChange := false
180180 for _ , c := range tools {
181- log .Debugf ("====== Name: %s kind: %s dependency: %s =====" , c .Name , c .Plugin .Kind , dependency )
181+ log .Debugf ("====== Name: %s (%s) dependency: %s =====" , c .Name , c .Plugin .Kind , dependency )
182182 if fmt .Sprintf ("%s%s%s" , c .Name , "." , c .Plugin .Kind ) == dependency {
183183 state := smgr .GetState (statemanager .StateKeyGenerateFunc (& c ))
184184 if drifted (c .Options , state .Options ) {
0 commit comments