Skip to content

Commit

Permalink
Skip plan on admin mode (#729)
Browse files Browse the repository at this point in the history
Keeping the admin workflow at the bare minimum by skipping the plan
step.
  • Loading branch information
samrabelachew authored Mar 4, 2024
1 parent 4283ab0 commit a76208a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/neptune/workflows/internal/terraform/job/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,11 @@ func (r *JobRunner) apply(executionCtx *ExecutionContext, planFile string, step
}

func (r *JobRunner) plan(ctx *ExecutionContext, mode *terraform.PlanMode, workflowMode terraform.WorkflowMode, extraArgs []string) (activities.TerraformPlanResponse, error) {
if workflowMode == terraform.Admin {
// Admin mode doesn't need to run a plan.
return activities.TerraformPlanResponse{}, nil
}
var resp activities.TerraformPlanResponse

args, err := command.NewArgumentList(extraArgs)
if err != nil {
return resp, errors.Wrapf(err, "creating argument list")
Expand Down

0 comments on commit a76208a

Please sign in to comment.