terraform/plans
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
..
internal/planproto build: Take protoc out of the "go generate" path 2018-10-18 10:39:20 -07:00
objchange core: Restore our EvalReadData behavior 2019-02-07 18:33:14 -08:00
planfile test for destroy plan round trip 2018-12-20 15:11:08 -05:00
action.go core: Handle forced-create_before_destroy during the plan walk 2018-10-16 19:14:11 -07:00
action_string.go plans: Regenerate Action.String for new action values 2018-10-16 19:14:11 -07:00
changes.go plans: OutputChange.Encode must preserve Addr field 2018-11-01 17:33:10 -07:00
changes_src.go don't attempt to decode empty changes values 2018-12-20 13:06:53 -05:00
changes_state.go plans: New package for in-memory plan models 2018-10-16 18:50:29 -07:00
changes_sync.go core: Allow planned output changes to be updated during apply 2018-11-05 16:02:45 -08:00
doc.go plans: New package for in-memory plan models 2018-10-16 18:50:29 -07:00
dynamic_value.go don't convert empty DynamicValue to nil 2018-12-20 10:28:26 -05:00
dynamic_value_test.go plans: New package for in-memory plan models 2018-10-16 18:50:29 -07:00
plan.go terraform: Ugly huge change to weave in new State and Plan types 2018-10-16 19:11:09 -07:00
plan_test.go make Changes.Empty() not count NoOps 2018-10-16 19:14:11 -07:00