From 74582447bbe58cac1be6d552230b9bd6ed8ea94e Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Sat, 13 Oct 2018 08:07:58 -0700 Subject: [PATCH] command: Make input variable values available to "terraform console" This fixes TestConsole_tfvars. --- command/console.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/command/console.go b/command/console.go index 749f4a2f1..3c1f9d356 100644 --- a/command/console.go +++ b/command/console.go @@ -74,6 +74,15 @@ func (c *ConsoleCommand) Run(args []string) int { c.showDiagnostics(diags) return 1 } + { + var moreDiags tfdiags.Diagnostics + opReq.Variables, moreDiags = c.collectVariableValues() + diags = diags.Append(moreDiags) + if moreDiags.HasErrors() { + c.showDiagnostics(diags) + return 1 + } + } // Get the context ctx, _, ctxDiags := local.Context(opReq)