@@ -61,27 +61,26 @@ type ApplyHuman struct {
6161var _ Apply = (* ApplyHuman )(nil )
6262
6363func (v * ApplyHuman ) ResourceCount (stateOutPath string ) {
64+ var summary string
6465 if v .destroy {
65- v .view .streams .Printf (
66- v .view .colorize .Color ("[reset][bold][green]\n Destroy complete! Resources: %d destroyed.\n " ),
67- v .countHook .Removed ,
68- )
66+ summary = fmt .Sprintf ("Destroy complete! Resources: %d destroyed." , v .countHook .Removed )
6967 } else if v .countHook .Imported > 0 {
70- v .view .streams .Printf (
71- v .view .colorize .Color ("[reset][bold][green]\n Apply complete! Resources: %d imported, %d added, %d changed, %d destroyed.\n " ),
68+ summary = fmt .Sprintf ("Apply complete! Resources: %d imported, %d added, %d changed, %d destroyed." ,
7269 v .countHook .Imported ,
7370 v .countHook .Added ,
7471 v .countHook .Changed ,
75- v .countHook .Removed ,
76- )
72+ v .countHook .Removed )
7773 } else {
78- v .view .streams .Printf (
79- v .view .colorize .Color ("[reset][bold][green]\n Apply complete! Resources: %d added, %d changed, %d destroyed.\n " ),
74+ summary = fmt .Sprintf ("Apply complete! Resources: %d added, %d changed, %d destroyed." ,
8075 v .countHook .Added ,
8176 v .countHook .Changed ,
82- v .countHook .Removed ,
83- )
77+ v .countHook .Removed )
8478 }
79+ v .view .streams .Print (v .view .colorize .Color ("[reset][bold][green]\n " + summary ))
80+ if v .countHook .ActionInvocation > 0 {
81+ v .view .streams .Print (v .view .colorize .Color (fmt .Sprintf ("[reset][bold][green] Actions: %d invoked." , v .countHook .ActionInvocation )))
82+ }
83+ v .view .streams .Print ("\n " )
8584 if (v .countHook .Added > 0 || v .countHook .Changed > 0 ) && stateOutPath != "" {
8685 v .view .streams .Printf ("\n %s\n \n " , format .WordWrap (stateOutPathPostApply , v .view .outputColumns ()))
8786 v .view .streams .Printf ("State path: %s\n " , stateOutPath )
0 commit comments