output warning flag

This commit is contained in:
James Bardin 2017-11-21 17:24:26 -05:00
parent cc5e480378
commit 5fa24a0128
2 changed files with 6 additions and 2 deletions

View File

@ -68,9 +68,9 @@ func (n *EvalWriteOutput) Eval(ctx EvalContext) (interface{}, error) {
// handling the interpolation error
if err != nil {
if n.ContinueOnErr {
if n.ContinueOnErr || flagWarnOutputErrors {
log.Printf("[ERROR] Output interpolation %q failed: %s", n.Name, err)
// if we're continueing, make sure the output is included, and
// if we're continuing, make sure the output is included, and
// marked as unknown
mod.Outputs[n.Name] = &OutputState{
Type: "string",

View File

@ -1,3 +1,7 @@
package terraform
import "os"
// This file holds feature flags for the next release
var flagWarnOutputErrors = os.Getenv("TF_WARN_OUTPUT_ERRORS") != ""