terraform: EvalInstanceInfo on data sources in new graph

This doesn't cause any practical issues as far as I'm aware (couldn't
get any test to fail), but caused shadow errors since it wasn't matching
the prior behavior.
This commit is contained in:
Mitchell Hashimoto 2016-11-15 09:02:10 -08:00
parent b6f5eb6371
commit c6fd938fb8
No known key found for this signature in database
GPG Key ID: 744E147AA52F5B0A
2 changed files with 7 additions and 2 deletions

View File

@ -75,6 +75,11 @@ func (n *NodeApplyableResource) evalTreeDataResource(
return &EvalSequence{ return &EvalSequence{
Nodes: []EvalNode{ Nodes: []EvalNode{
// Build the instance info
&EvalInstanceInfo{
Info: info,
},
// Get the saved diff for apply // Get the saved diff for apply
&EvalReadDiff{ &EvalReadDiff{
Name: stateId, Name: stateId,

View File

@ -682,7 +682,7 @@ func (p *shadowResourceProviderShadow) ReadDataDiff(
p.ErrorLock.Lock() p.ErrorLock.Lock()
defer p.ErrorLock.Unlock() defer p.ErrorLock.Unlock()
p.Error = multierror.Append(p.Error, fmt.Errorf( p.Error = multierror.Append(p.Error, fmt.Errorf(
"Unknown 'ReadDataDiff' shadow value: %#v", raw)) "Unknown 'ReadDataDiff' shadow value for %q: %#v", key, raw))
return nil, nil return nil, nil
} }
@ -718,7 +718,7 @@ func (p *shadowResourceProviderShadow) ReadDataApply(
p.ErrorLock.Lock() p.ErrorLock.Lock()
defer p.ErrorLock.Unlock() defer p.ErrorLock.Unlock()
p.Error = multierror.Append(p.Error, fmt.Errorf( p.Error = multierror.Append(p.Error, fmt.Errorf(
"Unknown 'ReadDataApply' shadow value: %#v", raw)) "Unknown 'ReadDataApply' shadow value for %q: %#v", key, raw))
return nil, nil return nil, nil
} }