-
Notifications
You must be signed in to change notification settings - Fork 9.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Module Expansion Activate! #24461
Module Expansion Activate! #24461
Commits on Mar 25, 2020
-
As the Graph is walked, the current way to set the context path was to have the walker return a context from EnterPath. This required that every node know it's absolute path, which can no longer be the case during plan when modules have not been expanded. This introduces a new method called WithPath, which returns a copy of the context with the internal path updated to reflect the method argument. Any use of the EvalContext that requires knowing the path will now panic if it wasn't explicitly set to ensure that evaluations always occur in the correct path. Add EvalContext to the GraphWalker interface. EvalContext returns an EvalContext that has not yet set a path. This will allow us to enforce that all context operations requiring a module instance path will require that a path be explicitly set rather than evaluating within the wrong path.
Configuration menu - View commit details
-
Copy full SHA for 0b025d7 - Browse repository at this point
Copy the full SHA 0b025d7View commit details -
While the Expander itself now handles the recursive expansion of modules, Resources themselves still need to be expanded twice, because the evaluation of the Resource, which entails evaluating the for_each or count expressions, is separate from the ResourceInstance expansion. Add a nodeExpandPlannableResource to do handle this expansion to allow all NodePlannableResources to call EvalWriteResourceState with an absolute address.
Configuration menu - View commit details
-
Copy full SHA for 40f0902 - Browse repository at this point
Copy the full SHA 40f0902View commit details -
create nodeExpandApplyableResource
Resources also need to be expanded during apply, which cannot be done via EvalTree due to the lack of EvalContext.
Configuration menu - View commit details
-
Copy full SHA for 23cebc5 - Browse repository at this point
Copy the full SHA 23cebc5View commit details -
NewNodeAbstractResource accepts a ResourceConfig
Use the new addrs type here. Also remove the uniqueMap from the config transformer. We enforce uniqueness during config loading, and this is more likely to have false positives due to stringification than anything.
Configuration menu - View commit details
-
Copy full SHA for 0b85eea - Browse repository at this point
Copy the full SHA 0b85eeaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 74d85aa - Browse repository at this point
Copy the full SHA 74d85aaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0afa371 - Browse repository at this point
Copy the full SHA 0afa371View commit details -
use addrs.ConfigResource for dependency tracking
We can't get module instances during transformation, so we need to reduce the Dependencies to using `addrs.ConfigResource` for now.
Configuration menu - View commit details
-
Copy full SHA for b3fc0da - Browse repository at this point
Copy the full SHA b3fc0daView commit details -
remove UnkeyedInstanceShim from some provider nodes
Remove the shims where they aren't necessary from the Init and Close provider nodes. This also removed some provider path checks from the builtin eval context, which cannot be resolved since the context may not be created with a ModuleInstance path.
Configuration menu - View commit details
-
Copy full SHA for 2474b87 - Browse repository at this point
Copy the full SHA 2474b87View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7f0199b - Browse repository at this point
Copy the full SHA 7f0199bView commit details -
orphan resources needs to use AbsResource
The expand logic was separated into nodeExpandRefreshableManagedResource, but the orphan logic wasn't updated.
Configuration menu - View commit details
-
Copy full SHA for 8eb3f2c - Browse repository at this point
Copy the full SHA 8eb3f2cView commit details -
Configuration menu - View commit details
-
Copy full SHA for cd045f6 - Browse repository at this point
Copy the full SHA cd045f6View commit details -
simplify the test a bit and add a few more combinations to the config
Configuration menu - View commit details
-
Copy full SHA for 04a117b - Browse repository at this point
Copy the full SHA 04a117bView commit details -
eval nodes no longer always have a context path
Configuration menu - View commit details
-
Copy full SHA for 5810261 - Browse repository at this point
Copy the full SHA 5810261View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4f1692c - Browse repository at this point
Copy the full SHA 4f1692cView commit details
Commits on Mar 26, 2020
-
comment update and remove extra Name method
This name method won't be called in the full graph, and remove it to prevent confusion with the parent node in logs.
Configuration menu - View commit details
-
Copy full SHA for cec989d - Browse repository at this point
Copy the full SHA cec989dView commit details