From 7ee8a37d50660f239e2d21ba6a0ea07aad655511 Mon Sep 17 00:00:00 2001 From: Luke Kysow Date: Thu, 28 Sep 2017 08:03:05 -0700 Subject: [PATCH] Ensure planfile is last arg to apply. Fixes #151 --- server/apply_executor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/apply_executor.go b/server/apply_executor.go index b83c42529c..decf041c3a 100644 --- a/server/apply_executor.go +++ b/server/apply_executor.go @@ -145,7 +145,7 @@ func (a *ApplyExecutor) apply(ctx *CommandContext, repoDir string, plan models.P } } - tfApplyCmd := append(append([]string{"apply", "-no-color", plan.LocalPath}, applyExtraArgs...), ctx.Command.Flags...) + tfApplyCmd := append(append(append([]string{"apply", "-no-color"}, applyExtraArgs...), ctx.Command.Flags...), plan.LocalPath) output, err := a.terraform.RunCommandWithVersion(ctx.Log, absolutePath, tfApplyCmd, terraformVersion, tfEnv) if err != nil { return ProjectResult{Error: fmt.Errorf("%s\n%s", err.Error(), output)}