@@ -36,9 +36,6 @@ const (
36
36
37
37
varEnvVarPrefix = "TF_VAR_"
38
38
cliArgEnvVarPrefix = "TF_CLI_ARGS_"
39
-
40
- componentStr = "component"
41
- stackStr = "stack"
42
39
)
43
40
44
41
var prohibitedEnvVars = []string {
@@ -300,7 +297,7 @@ func GetTerraformOutput(
300
297
sections , err := ExecuteDescribeComponent (component , stack , true , true , nil )
301
298
if err != nil {
302
299
u .PrintfMessageToTUI ("\r ✗ %s\n " , message )
303
- log .Fatal ("Failed to describe the component" , componentStr , component , stackStr , stack , "error" , err )
300
+ log .Fatal ("Failed to describe the component" , cfg . ComponentStr , component , cfg . StackStr , stack , "error" , err )
304
301
}
305
302
306
303
// Check if the component in the stack is configured with the 'static' remote state backend, in which case get the
@@ -321,7 +318,7 @@ func GetTerraformOutput(
321
318
terraformOutputs , err := execTerraformOutput (atmosConfig , component , stack , sections )
322
319
if err != nil {
323
320
u .PrintfMessageToTUI ("\r ✗ %s\n " , message )
324
- log .Fatal ("Failed to execute terraform output" , componentStr , component , stackStr , stack , "error" , err )
321
+ log .Fatal ("Failed to execute terraform output" , cfg . ComponentStr , component , cfg . StackStr , stack , "error" , err )
325
322
}
326
323
327
324
// Cache the result
@@ -347,7 +344,7 @@ func getTerraformOutputVariable(
347
344
348
345
res , err := u .EvaluateYqExpression (atmosConfig , outputs , val )
349
346
if err != nil {
350
- log .Fatal ("Error evaluating terraform output" , "output" , output , componentStr , component , stackStr , stack , "error" , err )
347
+ log .Fatal ("Error evaluating terraform output" , "output" , output , cfg . ComponentStr , component , cfg . StackStr , stack , "error" , err )
351
348
}
352
349
353
350
return res
@@ -367,7 +364,7 @@ func getStaticRemoteStateOutput(
367
364
368
365
res , err := u .EvaluateYqExpression (atmosConfig , remoteStateSection , val )
369
366
if err != nil {
370
- log .Fatal ("Error evaluating the 'static' remote state backend output" , "output" , output , componentStr , component , stackStr , stack , "error" , err )
367
+ log .Fatal ("Error evaluating the 'static' remote state backend output" , "output" , output , cfg . ComponentStr , component , cfg . StackStr , stack , "error" , err )
371
368
}
372
369
373
370
return res
0 commit comments