diff --git a/terraform/eval_output.go b/terraform/eval_output.go index cc83938eb..a8346276f 100644 --- a/terraform/eval_output.go +++ b/terraform/eval_output.go @@ -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", diff --git a/terraform/features.go b/terraform/features.go index 752076806..97c77bdbd 100644 --- a/terraform/features.go +++ b/terraform/features.go @@ -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") != ""