Skip to content

Commit eeb4efe

Browse files
committed
Yet more defensive
1 parent ad0299f commit eeb4efe

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

pkg/pulumiyaml/run.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2181,11 +2181,13 @@ func (e *programEvaluator) evaluatePropertyAccessTail(expr ast.Expr, receiver in
21812181
} else if !ok || prop.IsNull() {
21822182
receiver = nil
21832183
} else {
2184-
// Not-known-to-be-unknown properties inside maps containing unknowns
2185-
// should be treated as unknown during previews to ensure that we
2186-
// don't end up using old values.
2184+
// Not-known-to-be-unknown output/computed properties inside maps
2185+
// containing unknowns should be treated as unknown during previews to
2186+
// ensure that we don't end up using old values.
21872187
if e.pulumiCtx.DryRun() && x.ContainsUnknowns() && !prop.ContainsUnknowns() {
2188-
return unknownOutput(), true
2188+
if prop.IsOutput() || prop.IsComputed() {
2189+
return unknownOutput(), true
2190+
}
21892191
}
21902192

21912193
receiver = prop

0 commit comments

Comments
 (0)