@@ -160,7 +160,7 @@ func ExecuteTerraform(info schema.ConfigAndStacksInfo) error {
160
160
varFilePath = constructTerraformComponentVarfilePath (atmosConfig , info )
161
161
}
162
162
163
- log .Debug ("Writing the variables to file " , "file" , varFilePath )
163
+ log .Debug ("Writing the variables" , "file" , varFilePath )
164
164
165
165
if ! info .DryRun {
166
166
err = u .WriteToFileAsJSON (varFilePath , info .ComponentVarsSection , 0o644 )
@@ -347,36 +347,31 @@ func ExecuteTerraform(info schema.ConfigAndStacksInfo) error {
347
347
}
348
348
}
349
349
350
- // Print command info
351
- log .Debug ("Command info:" )
352
- log .Debug ("Terraform executable" , "command" , info .Command )
353
-
350
+ // Print the command info/context.
351
+ var command string
354
352
if info .SubCommand2 == "" {
355
- log . Debug ( "Executing terraform" , " command" , info .SubCommand )
353
+ command = info .SubCommand
356
354
} else {
357
- log .Debug (fmt .Sprintf ("Terraform command: %s %s" , info .SubCommand , info .SubCommand2 ))
358
- }
359
-
360
- log .Debug (fmt .Sprintf ("Arguments and flags: %v" , info .AdditionalArgsAndFlags ))
361
- log .Debug ("Component: " + info .ComponentFromArg )
362
-
363
- if len (info .BaseComponentPath ) > 0 {
364
- log .Debug ("Terraform component: " + info .BaseComponentPath )
355
+ command = fmt .Sprintf ("%s %s" , info .SubCommand , info .SubCommand2 )
365
356
}
366
357
358
+ var inheritance string
367
359
if len (info .ComponentInheritanceChain ) > 0 {
368
- log .Debug ("Inheritance: " + info .ComponentFromArg + " -> " + strings .Join (info .ComponentInheritanceChain , " -> " ))
369
- }
370
-
371
- if info .Stack == info .StackFromArg {
372
- log .Debug ("Stack: " + info .StackFromArg )
373
- } else {
374
- log .Debug ("Stack: " + info .StackFromArg )
375
- log .Debug ("Stack path: " + filepath .Join (atmosConfig .BasePath , atmosConfig .Stacks .BasePath , info .Stack ))
376
- }
377
-
378
- log .Debug ("Working directory" , "path" , workingDir )
360
+ inheritance = info .ComponentFromArg + " -> " + strings .Join (info .ComponentInheritanceChain , " -> " )
361
+ }
362
+
363
+ log .Debug ("Terraform context" ,
364
+ "executable" , info .Command ,
365
+ "command" , command ,
366
+ "component" , info .ComponentFromArg ,
367
+ "stack" , info .StackFromArg ,
368
+ "arguments and flags" , info .AdditionalArgsAndFlags ,
369
+ "terraform component" , info .BaseComponentPath ,
370
+ "inheritance" , inheritance ,
371
+ "working directory" , workingDir ,
372
+ )
379
373
374
+ // Prepare the terraform command
380
375
allArgsAndFlags := strings .Fields (info .SubCommand )
381
376
382
377
switch info .SubCommand {
0 commit comments