terraform/plans/objchange
Martin Atkins 312d798a89 core: Restore our EvalReadData behavior
In an earlier commit we changed objchange.ProposedNewObject so that the
task of populating unknown values for attributes not known during apply
is the responsibility of the provider's PlanResourceChange method, rather
than being handled automatically.

However, we were also using objchange.ProposedNewObject to construct the
placeholder new object for a deferred data resource read, and so we
inadvertently broke that deferral behavior. Here we restore the old
behavior by introducing a new function objchange.PlannedDataResourceObject
which is a specialized version of objchange.ProposedNewObject that
includes the forced behavior of populating unknown values, because the
provider gets no opportunity to customize a deferred read.

TestContext2Plan_createBeforeDestroy_depends_datasource required some
updates here because its implementation of PlanResourceChange was not
handling the insertion of the unknown value for attribute "computed".
The other changes here are just in an attempt to make the flow of this
test more obvious, by clarifying that it is simulating a -refresh=false
run, which effectively forces a deferred read since we skip the eager
read that would normally happen in the refresh step.
2019-02-07 18:33:14 -08:00
..
all_null.go plans/objchange: Don't presume unknown for values unset in config 2019-02-07 14:01:39 -08:00
compatible.go plans/objchange: Improve precision of AssertObjectCompatible with sets 2019-02-04 18:19:46 -08:00
compatible_test.go plans/objchange: Improve precision of AssertObjectCompatible with sets 2019-02-04 18:19:46 -08:00
doc.go plans/objchange: logic for merging prior state with config 2018-10-16 19:11:09 -07:00
lcs.go plans/objchange: LongestCommonSubsequence 2018-10-16 19:14:11 -07:00
lcs_test.go plans/objchange: LongestCommonSubsequence 2018-10-16 19:14:11 -07:00
objchange.go core: Restore our EvalReadData behavior 2019-02-07 18:33:14 -08:00
objchange_test.go plans/objchange: Don't presume unknown for values unset in config 2019-02-07 14:01:39 -08:00