aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/hashicorp/terraform/addrs/parse_ref.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/hashicorp/terraform/addrs/parse_ref.go')
-rw-r--r--vendor/github.com/hashicorp/terraform/addrs/parse_ref.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/vendor/github.com/hashicorp/terraform/addrs/parse_ref.go b/vendor/github.com/hashicorp/terraform/addrs/parse_ref.go
index 84fe8a0..a230d0c 100644
--- a/vendor/github.com/hashicorp/terraform/addrs/parse_ref.go
+++ b/vendor/github.com/hashicorp/terraform/addrs/parse_ref.go
@@ -85,6 +85,14 @@ func parseRef(traversal hcl.Traversal) (*Reference, tfdiags.Diagnostics) {
85 Remaining: remain, 85 Remaining: remain,
86 }, diags 86 }, diags
87 87
88 case "each":
89 name, rng, remain, diags := parseSingleAttrRef(traversal)
90 return &Reference{
91 Subject: ForEachAttr{Name: name},
92 SourceRange: tfdiags.SourceRangeFromHCL(rng),
93 Remaining: remain,
94 }, diags
95
88 case "data": 96 case "data":
89 if len(traversal) < 3 { 97 if len(traversal) < 3 {
90 diags = diags.Append(&hcl.Diagnostic{ 98 diags = diags.Append(&hcl.Diagnostic{