aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/hashicorp/terraform/terraform/node_resource_plan.go
diff options
context:
space:
mode:
authorAlexandre Garand <alexandre.garand@fretlink.com>2019-08-09 15:59:15 +0200
committerAlexandre Garand <alexandre.garand@fretlink.com>2019-08-09 16:39:21 +0200
commit863486a6b71ed0e562a3965bed56465d007b1418 (patch)
treee93f6a687695af86d54237ec9f575d4ef104222d /vendor/github.com/hashicorp/terraform/terraform/node_resource_plan.go
parent49c1c7b4dc69ffb9ab52330e6dc52ccdd6351087 (diff)
downloadterraform-provider-statuscake-863486a6b71ed0e562a3965bed56465d007b1418.tar.gz
terraform-provider-statuscake-863486a6b71ed0e562a3965bed56465d007b1418.tar.zst
terraform-provider-statuscake-863486a6b71ed0e562a3965bed56465d007b1418.zip
update vendor and go.modadd_contact_groups
Diffstat (limited to 'vendor/github.com/hashicorp/terraform/terraform/node_resource_plan.go')
-rw-r--r--vendor/github.com/hashicorp/terraform/terraform/node_resource_plan.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/vendor/github.com/hashicorp/terraform/terraform/node_resource_plan.go b/vendor/github.com/hashicorp/terraform/terraform/node_resource_plan.go
index 633c1c4..ec4aa93 100644
--- a/vendor/github.com/hashicorp/terraform/terraform/node_resource_plan.go
+++ b/vendor/github.com/hashicorp/terraform/terraform/node_resource_plan.go
@@ -77,6 +77,11 @@ func (n *NodePlannableResource) DynamicExpand(ctx EvalContext) (*Graph, error) {
77 return nil, diags.Err() 77 return nil, diags.Err()
78 } 78 }
79 79
80 forEachMap, forEachDiags := evaluateResourceForEachExpression(n.Config.ForEach, ctx)
81 if forEachDiags.HasErrors() {
82 return nil, diags.Err()
83 }
84
80 // Next we need to potentially rename an instance address in the state 85 // Next we need to potentially rename an instance address in the state
81 // if we're transitioning whether "count" is set at all. 86 // if we're transitioning whether "count" is set at all.
82 fixResourceCountSetTransition(ctx, n.ResourceAddr(), count != -1) 87 fixResourceCountSetTransition(ctx, n.ResourceAddr(), count != -1)
@@ -119,18 +124,20 @@ func (n *NodePlannableResource) DynamicExpand(ctx EvalContext) (*Graph, error) {
119 124
120 // Start creating the steps 125 // Start creating the steps
121 steps := []GraphTransformer{ 126 steps := []GraphTransformer{
122 // Expand the count. 127 // Expand the count or for_each (if present)
123 &ResourceCountTransformer{ 128 &ResourceCountTransformer{
124 Concrete: concreteResource, 129 Concrete: concreteResource,
125 Schema: n.Schema, 130 Schema: n.Schema,
126 Count: count, 131 Count: count,
132 ForEach: forEachMap,
127 Addr: n.ResourceAddr(), 133 Addr: n.ResourceAddr(),
128 }, 134 },
129 135
130 // Add the count orphans 136 // Add the count/for_each orphans
131 &OrphanResourceCountTransformer{ 137 &OrphanResourceCountTransformer{
132 Concrete: concreteResourceOrphan, 138 Concrete: concreteResourceOrphan,
133 Count: count, 139 Count: count,
140 ForEach: forEachMap,
134 Addr: n.ResourceAddr(), 141 Addr: n.ResourceAddr(),
135 State: state, 142 State: state,
136 }, 143 },