diff --git a/terraform/context_test.go b/terraform/context_test.go index faa7f75d8..0188e7d95 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 849c2c90d..1e03faf44 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