aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/hashicorp/terraform/configs/version_constraint.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/hashicorp/terraform/configs/version_constraint.go')
-rw-r--r--vendor/github.com/hashicorp/terraform/configs/version_constraint.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/vendor/github.com/hashicorp/terraform/configs/version_constraint.go b/vendor/github.com/hashicorp/terraform/configs/version_constraint.go
index 7aa19ef..e40ce16 100644
--- a/vendor/github.com/hashicorp/terraform/configs/version_constraint.go
+++ b/vendor/github.com/hashicorp/terraform/configs/version_constraint.go
@@ -45,6 +45,13 @@ func decodeVersionConstraint(attr *hcl.Attribute) (VersionConstraint, hcl.Diagno
45 return ret, diags 45 return ret, diags
46 } 46 }
47 47
48 if !val.IsWhollyKnown() {
49 // If there is a syntax error, HCL sets the value of the given attribute
50 // to cty.DynamicVal. A diagnostic for the syntax error will already
51 // bubble up, so we will move forward gracefully here.
52 return ret, diags
53 }
54
48 constraintStr := val.AsString() 55 constraintStr := val.AsString()
49 constraints, err := version.NewConstraint(constraintStr) 56 constraints, err := version.NewConstraint(constraintStr)
50 if err != nil { 57 if err != nil {