diff options
Diffstat (limited to 'vendor/github.com/hashicorp/terraform/terraform/node_resource_refresh.go')
-rw-r--r-- | vendor/github.com/hashicorp/terraform/terraform/node_resource_refresh.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/vendor/github.com/hashicorp/terraform/terraform/node_resource_refresh.go b/vendor/github.com/hashicorp/terraform/terraform/node_resource_refresh.go index 9506023..9daeabf 100644 --- a/vendor/github.com/hashicorp/terraform/terraform/node_resource_refresh.go +++ b/vendor/github.com/hashicorp/terraform/terraform/node_resource_refresh.go | |||
@@ -39,6 +39,11 @@ func (n *NodeRefreshableManagedResource) DynamicExpand(ctx EvalContext) (*Graph, | |||
39 | return nil, diags.Err() | 39 | return nil, diags.Err() |
40 | } | 40 | } |
41 | 41 | ||
42 | forEachMap, forEachDiags := evaluateResourceForEachExpression(n.Config.ForEach, ctx) | ||
43 | if forEachDiags.HasErrors() { | ||
44 | return nil, diags.Err() | ||
45 | } | ||
46 | |||
42 | // Next we need to potentially rename an instance address in the state | 47 | // Next we need to potentially rename an instance address in the state |
43 | // if we're transitioning whether "count" is set at all. | 48 | // if we're transitioning whether "count" is set at all. |
44 | fixResourceCountSetTransition(ctx, n.ResourceAddr(), count != -1) | 49 | fixResourceCountSetTransition(ctx, n.ResourceAddr(), count != -1) |
@@ -66,6 +71,7 @@ func (n *NodeRefreshableManagedResource) DynamicExpand(ctx EvalContext) (*Graph, | |||
66 | Concrete: concreteResource, | 71 | Concrete: concreteResource, |
67 | Schema: n.Schema, | 72 | Schema: n.Schema, |
68 | Count: count, | 73 | Count: count, |
74 | ForEach: forEachMap, | ||
69 | Addr: n.ResourceAddr(), | 75 | Addr: n.ResourceAddr(), |
70 | }, | 76 | }, |
71 | 77 | ||
@@ -74,6 +80,7 @@ func (n *NodeRefreshableManagedResource) DynamicExpand(ctx EvalContext) (*Graph, | |||
74 | &OrphanResourceCountTransformer{ | 80 | &OrphanResourceCountTransformer{ |
75 | Concrete: concreteResource, | 81 | Concrete: concreteResource, |
76 | Count: count, | 82 | Count: count, |
83 | ForEach: forEachMap, | ||
77 | Addr: n.ResourceAddr(), | 84 | Addr: n.ResourceAddr(), |
78 | State: state, | 85 | State: state, |
79 | }, | 86 | }, |