Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2634 from hashicorp/improvement/logvar
Browse files Browse the repository at this point in the history
internal/core: log variable value source
  • Loading branch information
mitchellh authored Nov 1, 2021
2 parents 5fa2052 + c1b0d8c commit 283a474
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions internal/core/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,16 @@ func NewProject(ctx context.Context, os ...Option) (*Project, error) {
}

p.logger.Info("project initialized", "workspace", p.workspace)

// Output all the variables that this project will use along with
// the source of that variable. This can be used to debug unexpected
// variable values.
for name, value := range p.variables {
// We purposely do NOT log the value because it may be sensitive
// and we have no way currently to mark a variable sensitive or not.
p.logger.Debug("variable info", "name", name, "source", value.Source)
}

return p, nil
}

Expand Down

0 comments on commit 283a474

Please sign in to comment.