aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/hashicorp/terraform/addrs
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/addrs
parent49c1c7b4dc69ffb9ab52330e6dc52ccdd6351087 (diff)
downloadterraform-provider-statuscake-add_contact_groups.tar.gz
terraform-provider-statuscake-add_contact_groups.tar.zst
terraform-provider-statuscake-add_contact_groups.zip
update vendor and go.modadd_contact_groups
Diffstat (limited to 'vendor/github.com/hashicorp/terraform/addrs')
-rw-r--r--vendor/github.com/hashicorp/terraform/addrs/for_each_attr.go12
-rw-r--r--vendor/github.com/hashicorp/terraform/addrs/parse_ref.go8
2 files changed, 20 insertions, 0 deletions
diff --git a/vendor/github.com/hashicorp/terraform/addrs/for_each_attr.go b/vendor/github.com/hashicorp/terraform/addrs/for_each_attr.go
new file mode 100644
index 0000000..7a63850
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform/addrs/for_each_attr.go
@@ -0,0 +1,12 @@
1package addrs
2
3// ForEachAttr is the address of an attribute referencing the current "for_each" object in
4// the interpolation scope, addressed using the "each" keyword, ex. "each.key" and "each.value"
5type ForEachAttr struct {
6 referenceable
7 Name string
8}
9
10func (f ForEachAttr) String() string {
11 return "each." + f.Name
12}
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{