Render computeds differently during updates.

Rather than displaying `computed` as we do during previews, display
`undefined` instead, as these values may be intentionally undefined by
the user's program.

Fixes #633.
This commit is contained in:
pat@pulumi.com 2017-12-12 14:19:29 -08:00
parent b6a386995a
commit fcdc3495a4

View file

@ -601,7 +601,11 @@ func printPropertyValue(
write(b, op, "archive(uri:%s) { %v }", shortHash(a.Hash), a.URI)
}
} else if v.IsComputed() || v.IsOutput() {
writeVerbatim(b, op, v.TypeString())
if planning {
writeVerbatim(b, op, v.TypeString())
} else {
write(b, op, "undefined")
}
} else {
contract.Assert(v.IsObject())
obj := v.ObjectValue()