From e8516f259dfdb38ae7da6b45436c1705e7aab09a Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 15 Oct 2016 15:19:43 -0700 Subject: [PATCH] command/apply: Xnew-apply --- command/apply.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/command/apply.go b/command/apply.go index e1200b91d..345b2f7ee 100644 --- a/command/apply.go +++ b/command/apply.go @@ -95,6 +95,26 @@ func (c *ApplyCommand) Run(args []string) int { } } + // Check for the new apply + if terraform.X_newApply { + desc := "Experimental new apply graph has been enabled. This may still\n" + + "have bugs, and should be used with care. If you'd like to continue,\n" + + "you must enter exactly 'yes' as a response." + v, err := c.UIInput().Input(&terraform.InputOpts{ + Id: "Xnew-apply", + Query: "Experimental feature enabled: new apply graph. Continue?", + Description: desc, + }) + if err != nil { + c.Ui.Error(fmt.Sprintf("Error asking for confirmation: %s", err)) + return 1 + } + if v != "yes" { + c.Ui.Output("Apply cancelled.") + return 1 + } + } + // Build the context based on the arguments given ctx, planned, err := c.Context(contextOpts{ Destroy: c.Destroy,