aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/hashicorp/terraform/terraform/interpolate.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/hashicorp/terraform/terraform/interpolate.go')
-rw-r--r--vendor/github.com/hashicorp/terraform/terraform/interpolate.go13
1 files changed, 4 insertions, 9 deletions
diff --git a/vendor/github.com/hashicorp/terraform/terraform/interpolate.go b/vendor/github.com/hashicorp/terraform/terraform/interpolate.go
index 26c1857..97bb1f6 100644
--- a/vendor/github.com/hashicorp/terraform/terraform/interpolate.go
+++ b/vendor/github.com/hashicorp/terraform/terraform/interpolate.go
@@ -11,16 +11,11 @@ import (
11 "github.com/hashicorp/hil" 11 "github.com/hashicorp/hil"
12 "github.com/hashicorp/hil/ast" 12 "github.com/hashicorp/hil/ast"
13 "github.com/hashicorp/terraform/config" 13 "github.com/hashicorp/terraform/config"
14 "github.com/hashicorp/terraform/config/hcl2shim"
14 "github.com/hashicorp/terraform/config/module" 15 "github.com/hashicorp/terraform/config/module"
15 "github.com/hashicorp/terraform/flatmap" 16 "github.com/hashicorp/terraform/flatmap"
16) 17)
17 18
18const (
19 // VarEnvPrefix is the prefix of variables that are read from
20 // the environment to set variables here.
21 VarEnvPrefix = "TF_VAR_"
22)
23
24// Interpolater is the structure responsible for determining the values 19// Interpolater is the structure responsible for determining the values
25// for interpolations such as `aws_instance.foo.bar`. 20// for interpolations such as `aws_instance.foo.bar`.
26type Interpolater struct { 21type Interpolater struct {
@@ -71,7 +66,7 @@ func (i *Interpolater) valueCountVar(
71func unknownVariable() ast.Variable { 66func unknownVariable() ast.Variable {
72 return ast.Variable{ 67 return ast.Variable{
73 Type: ast.TypeUnknown, 68 Type: ast.TypeUnknown,
74 Value: config.UnknownVariableValue, 69 Value: hcl2shim.UnknownVariableValue,
75 } 70 }
76} 71}
77 72
@@ -659,7 +654,7 @@ func (i *Interpolater) interpolateComplexTypeAttribute(
659 // ".#" count field is marked as unknown to indicate "this whole list is 654 // ".#" count field is marked as unknown to indicate "this whole list is
660 // unknown". We must honor that meaning here so computed references can be 655 // unknown". We must honor that meaning here so computed references can be
661 // treated properly during the plan phase. 656 // treated properly during the plan phase.
662 if lengthAttr == config.UnknownVariableValue { 657 if lengthAttr == hcl2shim.UnknownVariableValue {
663 return unknownVariable(), nil 658 return unknownVariable(), nil
664 } 659 }
665 660
@@ -675,7 +670,7 @@ func (i *Interpolater) interpolateComplexTypeAttribute(
675 // ".%" count field is marked as unknown to indicate "this whole list is 670 // ".%" count field is marked as unknown to indicate "this whole list is
676 // unknown". We must honor that meaning here so computed references can be 671 // unknown". We must honor that meaning here so computed references can be
677 // treated properly during the plan phase. 672 // treated properly during the plan phase.
678 if lengthAttr == config.UnknownVariableValue { 673 if lengthAttr == hcl2shim.UnknownVariableValue {
679 return unknownVariable(), nil 674 return unknownVariable(), nil
680 } 675 }
681 676