Skip to content

Commit

Permalink
Added log when terraform.tfvars not found (#2782)
Browse files Browse the repository at this point in the history
Signed-off-by: Felipe Avelar <[email protected]>
  • Loading branch information
felipe-avelar authored Apr 12, 2021
1 parent d3d35f2 commit e3b146d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/parser/terraform/variables.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ func getInputVariables(currentPath string) {
log.Error().Msg("Error getting .auto.tfvars files")
}

if _, err := os.Stat(filepath.Join(currentPath, "terraform.tfvars")); err == nil {
_, err = os.Stat(filepath.Join(currentPath, "terraform.tfvars"))
if err != nil {
log.Info().Msg("terraform.tfvars not found")
} else {
tfVarsFiles = append(tfVarsFiles, filepath.Join(currentPath, "terraform.tfvars"))
}

Expand Down

0 comments on commit e3b146d

Please sign in to comment.