diff --git a/changelog/pending/20221123--cli--up-yes-should-not-use-update-plans.yaml b/changelog/pending/20221123--cli--up-yes-should-not-use-update-plans.yaml new file mode 100644 index 000000000000..7bd7606ad625 --- /dev/null +++ b/changelog/pending/20221123--cli--up-yes-should-not-use-update-plans.yaml @@ -0,0 +1,4 @@ +changes: +- type: fix + scope: cli + description: `up --yes` should not use update plans. diff --git a/pkg/backend/apply.go b/pkg/backend/apply.go index c0f7e8725852..6c985c55c5fb 100644 --- a/pkg/backend/apply.go +++ b/pkg/backend/apply.go @@ -122,6 +122,11 @@ func PreviewThenPrompt(ctx context.Context, kind apitype.UpdateKind, stack Stack // If there are no changes, or we're auto-approving or just previewing, we can skip the confirmation prompt. if op.Opts.AutoApprove || kind == apitype.PreviewUpdate { close(eventsChannel) + // If we're running in experimental mode then return the plan generated, else discard it. The user may + // be explicitly setting a plan but that's handled higher up the call stack. + if !op.Opts.Engine.Experimental { + plan = nil + } return plan, changes, nil }