in tf/terraform.go [72:85]
func (t *Terraform) Plan(varFile *string) (*tfjson.Plan, error) {
planOptions := []tfexec.PlanOption{tfexec.Out(planfile)}
if varFile != nil && *varFile != "" {
planOptions = append(planOptions, tfexec.VarFile(*varFile))
}
_, err := t.exec.Plan(context.TODO(), planOptions...)
if err != nil {
return nil, err
}
t.SetLogEnabled(false)
p, err := t.exec.ShowPlanFile(context.TODO(), planfile)
t.SetLogEnabled(true)
return p, err
}