Skip to content

Commit

Permalink
Omit sensitive_config_vars values from TF_LOG=debug output (#362)
Browse files Browse the repository at this point in the history
  • Loading branch information
mars authored Feb 22, 2023
1 parent 9f9ff29 commit 5c2c58a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions heroku/resource_heroku_app.go
Original file line number Diff line number Diff line change
Expand Up @@ -408,12 +408,16 @@ func resourceHerokuAppRead(d *schema.ResourceData, meta interface{}) error {
}
}

log.Printf("[LOG] Setting config vars: %s", configVars)
log.Printf("[DEBUG] Setting config vars: %s", configVars)
if err := d.Set("config_vars", configVars); err != nil {
log.Printf("[WARN] Error setting config vars: %s", err)
}

log.Printf("[LOG] Setting sensitive config vars: %s", sensitiveConfigVars)
var sensitiveVarNames []string
for sensitiveVarName, _ := range sensitiveConfigVars {
sensitiveVarNames = append(sensitiveVarNames, sensitiveVarName)
}
log.Printf("[DEBUG] Setting sensitive config vars: %s", sensitiveVarNames)
if err := d.Set("sensitive_config_vars", sensitiveConfigVars); err != nil {
log.Printf("[WARN] Error setting sensitive config vars: %s", err)
}
Expand Down

0 comments on commit 5c2c58a

Please sign in to comment.