Merge pull request #17513 from hashicorp/jbardin/GH-17509

Check for nil config in node_resource_refresh
This commit is contained in:
James Bardin 2018-03-08 18:12:13 -05:00 committed by GitHub
commit f825a2118b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -213,10 +213,16 @@ func (n *NodeRefreshableManagedResourceInstance) evalTreeManagedResourceNoState(
// Determine the dependencies for the state.
stateDeps := n.StateReferences()
// n.Config can be nil if the config and state don't match
var raw *config.RawConfig
if n.Config != nil {
raw = n.Config.RawConfig.Copy()
}
return &EvalSequence{
Nodes: []EvalNode{
&EvalInterpolate{
Config: n.Config.RawConfig.Copy(),
Config: raw,
Resource: resource,
Output: &resourceConfig,
},