Commit Graph

4 Commits

Author SHA1 Message Date
James Bardin 7964328f34 merge dependencies when refreshing
The resource configuration was always being used to determine
dependencies during refresh, because if there were no changes to a
resource, there was no chance to replace any incorrect stored
dependencies. Now that we are refreshing during plan, we can determine
that a resource has no changes and opt to store the new dependencies
immediately.

Here we clean up the writeResourceInstanceState calls to no longer
modify the resource instance state, removing the `dependencies`
argument. Callers are now expected to set the Dependencies field as
needed.
2021-03-29 14:34:01 -04:00
James Bardin 7dd570ef6c change mock provider to use GetSchemaResponse
This ensures that test providers are using the same types as actual
providers.
2021-01-12 16:31:18 -05:00
Kristin Laemmert 29d89c4a15
Eval(): refactor EvalWriteState() (#27145)
* fix inaccurate log

* terraform: refactor EvalWriteState

EvalWriteState is refactored into a method on
NodeAbstractResourceInstance and renamed writeResourceInstanceState.

Import, my nemesis, gave me pause. I did not expect to find
EvalWriteState in an transform node, and so I decided to copy the
function inline rather than rethink my entire refactor for one function
that's likely to be (heavily) refactored in the future.
2020-12-04 12:44:40 -05:00
Kristin Laemmert 90588c036b
terraform: minor cleanup from EvalTree() refactor (#26429)
* Split node_resource_abstract.go into two files, putting
NodeAbstractResourceInstance methods in their own file - it was getting
large enough to be tricky for (my) human eyeballs.

* un-exported the functions that were created as part of the EvalTree()
refactor; they did not need to be public.
2020-10-01 08:12:10 -04:00