add AttachDependsOnTransformer to plan

This transformer is what will provider the data sources with the
transitive dependencies needed to determine if they can read during plan
or must be deferred.
This commit is contained in:
James Bardin 2020-05-04 21:45:17 -04:00
parent 18ca98a064
commit 23e259a68c
2 changed files with 5 additions and 1 deletions

View File

@ -150,6 +150,10 @@ func (b *PlanGraphBuilder) Steps() []GraphTransformer {
// have to connect again later for providers and so on.
&ReferenceTransformer{},
// Make sure data sources are aware of any depends_on from the
// configuration
&AttachDependsOnTransformer{},
// Add the node to fix the state count boundaries
&CountBoundaryTransformer{
Config: b.Config,

View File

@ -163,7 +163,7 @@ func (t AttachDependsOnTransformer) Transform(g *Graph) error {
continue
}
// depMap will dedupe and only add resource references
// depMap will only add resource references and dedupe
m := make(depMap)
for _, dep := range refMap.DependsOn(v) {