From 842a16cee4a6a918ae01ca2bc18b61cf45f072c6 Mon Sep 17 00:00:00 2001 From: Pat Gavlin Date: Fri, 26 Jan 2018 16:05:42 -0800 Subject: [PATCH] Always set UpdateOptions.DryRun for previews. If we do not do this, the engine will assume that it should elide unknown input/output properties when interacting with the language and resource providers and we will produce unexpected results. --- pkg/engine/preview.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/engine/preview.go b/pkg/engine/preview.go index a84dfd51e..f8d5b3f47 100644 --- a/pkg/engine/preview.go +++ b/pkg/engine/preview.go @@ -24,6 +24,10 @@ func Preview(update Update, events chan<- Event, opts UpdateOptions) error { } defer info.Close() + // Always set opts.DryRun to `true` when processing previews: if we do not do this, the engine will assume that it + // should elide unknown input/output properties when interacting with the language and resource providers and we + // will produce unexpected results. + opts.DryRun = true return previewLatest(info, deployOptions{ UpdateOptions: opts,