diff --git a/backend/remote/backend_common.go b/backend/remote/backend_common.go index 08f9aa3b0..ad658e93c 100644 --- a/backend/remote/backend_common.go +++ b/backend/remote/backend_common.go @@ -495,10 +495,10 @@ func (b *Remote) confirm(stopCtx context.Context, op *backend.Operation, opts *t } if err == errRunDiscarded { + err = errApplyDiscarded if op.Destroy { err = errDestroyDiscarded } - err = errApplyDiscarded } result <- err diff --git a/backend/remote/backend_context_test.go b/backend/remote/backend_context_test.go index 48a6a8525..1a214deb9 100644 --- a/backend/remote/backend_context_test.go +++ b/backend/remote/backend_context_test.go @@ -195,7 +195,7 @@ func TestRemoteContextWithVars(t *testing.T) { key := "key" v.Key = &key } - b.client.Variables.Create(nil, workspaceID, *v) + b.client.Variables.Create(context.TODO(), workspaceID, *v) _, _, diags := b.Context(op)