core: Refresh, Validate, Input on new graph builders #11426
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR modifies the refresh, validate, and input graphs to use a new custom graph builder. This work is just continuing the work I started and shipped for 0.8 but on the less complex and less dangerous graphs. See #9973 or #9388 as prior examples.
The goal at this point now that plan/apply have shipped on new graphs is to complete the less dangerous graphs so we can ultimately fully remove the legacy graph building code. This PR completes that.
The changes are relatively minimal given we're doing three graphs.
What this PR changes/adds:
StateFilter
made more robust to handle cases where state may not have resource type. This was necessary for tests to pass without changes.ConfigTransformer
can filter the types of things added. This was necessary to add only data sources for refresh.EvalValidateResourceSelfRef
is added since our new graph builder never creates edges to self (prior one did and we caught those errors at the graph cycle layer)This PR does not enable/use the shadow graph. Refresh, validate, input are not scary operations (compared to plan/apply) and therefore we won't be using the shadow graph for this. We'll be shipping it default-on in 0.9 betas and let any bugs come through there.