put output errors behind a feature flag
We're going to start merging breaking functgionality behind feature flags, to reduce the need for long-lived feature branches.
This commit is contained in:
parent
35c6a4e89d
commit
715036d209
|
@ -68,6 +68,8 @@ func (n *EvalWriteOutput) Eval(ctx EvalContext) (interface{}, error) {
|
|||
|
||||
// handling the interpolation error
|
||||
if err != nil {
|
||||
switch {
|
||||
case featureOutputErrors:
|
||||
if n.ContinueOnErr {
|
||||
log.Printf("[ERROR] Output interpolation %q failed: %s", n.Name, err)
|
||||
// if we're continueing, make sure the output is included, and
|
||||
|
@ -78,8 +80,10 @@ func (n *EvalWriteOutput) Eval(ctx EvalContext) (interface{}, error) {
|
|||
}
|
||||
return nil, EvalEarlyExitError{}
|
||||
}
|
||||
|
||||
return nil, err
|
||||
default:
|
||||
log.Printf("[WARN] Output interpolation %q failed: %s", n.Name, err)
|
||||
}
|
||||
}
|
||||
|
||||
// Get the value from the config
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
package terraform
|
||||
|
||||
import (
|
||||
"os"
|
||||
)
|
||||
|
||||
// This file holds feature flags for the next release
|
||||
|
||||
var featureOutputErrors = os.Getenv("TF_OUTPUT_ERRORS") != ""
|
Loading…
Reference in New Issue