Skip to content

Commit 3279106

Browse files
authored
fix npe on drift-detection for manual job (#1832)
1 parent 9a2b940 commit 3279106

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cli/pkg/digger/digger.go

+6
Original file line numberDiff line numberDiff line change
@@ -593,15 +593,20 @@ func RunJob(
593593
}
594594

595595
var terraformExecutor execution.TerraformExecutor
596+
var iacUtils iac_utils.IacUtils
596597
projectPath := path.Join(workingDir, job.ProjectDir)
597598
if job.Terragrunt {
598599
terraformExecutor = execution.Terragrunt{WorkingDir: projectPath}
600+
iacUtils = iac_utils.TerraformUtils{}
599601
} else if job.OpenTofu {
600602
terraformExecutor = execution.OpenTofu{WorkingDir: projectPath, Workspace: job.ProjectWorkspace}
603+
iacUtils = iac_utils.TerraformUtils{}
601604
} else if job.Pulumi {
602605
terraformExecutor = execution.Pulumi{WorkingDir: projectPath, Stack: job.ProjectWorkspace}
606+
iacUtils = iac_utils.PulumiUtils{}
603607
} else {
604608
terraformExecutor = execution.Terraform{WorkingDir: projectPath, Workspace: job.ProjectWorkspace}
609+
iacUtils = iac_utils.TerraformUtils{}
605610
}
606611

607612
commandRunner := execution.CommandRunner{}
@@ -627,6 +632,7 @@ func RunJob(
627632
TerraformExecutor: terraformExecutor,
628633
PlanStorage: planStorage,
629634
PlanPathProvider: planPathProvider,
635+
IacUtils: iacUtils,
630636
}
631637

632638
switch command {

0 commit comments

Comments
 (0)