File tree Expand file tree Collapse file tree
pkg/controller/configuration Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -114,8 +114,10 @@ func (c *Controller) ensureErrorDetection(configuration *terraformv1alpha1.Confi
114114 return reconcile.Result {}, controller .ErrIgnore
115115 }
116116 if m .MatchString (string (logs )) {
117+ message := detectors [i ].Message
118+
117119 //nolint:govet
118- cond .ActionRequired (detectors [ i ]. Message )
120+ cond .ActionRequired (message )
119121 }
120122 }
121123
Original file line number Diff line number Diff line change @@ -248,19 +248,21 @@ func (c *Controller) ensureCustomBackendTemplate(configuration *terraformv1alpha
248248 return reconcile.Result {}, err
249249 }
250250 if ! found {
251+ mesasage := fmt .Sprintf ("Backend template secret %q not found, contact administrator" , reference )
251252 //nolint:govet
252- cond .ActionRequired (fmt . Sprintf ( "Backend template secret %q not found, contact administrator" , reference ) )
253+ cond .ActionRequired (mesasage )
253254
254255 return reconcile.Result {}, controller .ErrIgnore
255256 }
256257
257258 // @step: ensure we have the backend.tf key in the secret
258259 backend , ok := secret .Data [terraformv1alpha1 .TerraformBackendSecretKey ]
259260 if ! ok || len (backend ) == 0 {
261+ message := fmt .Sprintf ("Backend template secret %q does not contain the %s key" ,
262+ reference , terraformv1alpha1 .TerraformBackendSecretKey )
263+
260264 //nolint:govet
261- cond .ActionRequired (fmt .Sprintf ("Backend template secret %q does not contain the %s key" ,
262- reference , terraformv1alpha1 .TerraformBackendSecretKey ),
263- )
265+ cond .ActionRequired (message )
264266
265267 return reconcile.Result {}, controller .ErrIgnore
266268 }
You can’t perform that action at this time.
0 commit comments