diff --git a/terraform/context_test.go b/terraform/context_test.go index faa7f75d8c..0188e7d951 100644 --- a/terraform/context_test.go +++ b/terraform/context_test.go @@ -4240,7 +4240,6 @@ func TestContext2Apply_output(t *testing.T) { } } -/* func TestContext2Apply_outputInvalid(t *testing.T) { m := testModule(t, "apply-output-invalid") p := testProvider("aws") @@ -4261,7 +4260,6 @@ func TestContext2Apply_outputInvalid(t *testing.T) { t.Fatalf("err: %s", err) } } -*/ func TestContext2Apply_outputList(t *testing.T) { m := testModule(t, "apply-output-list") diff --git a/terraform/eval_output.go b/terraform/eval_output.go index 849c2c90d6..1e03faf449 100644 --- a/terraform/eval_output.go +++ b/terraform/eval_output.go @@ -58,7 +58,7 @@ func (n *EvalWriteOutput) Eval( valueRaw = list[0] } if _, ok := valueRaw.(string); !ok { - valueRaw = "" + return nil, fmt.Errorf("output %s is not a string", n.Name) } // Write the output