vendor: Upgrade both HCL2 and cty

The cty change here fixes a panic situation when cty.Path.Apply is given
a null value, making it now correctly return an error.

However, the HCL2 change includes an alternative to cty.Path.Apply that
uses HCL-level rules rather than cty-level rules, so the result behaves
like an HCL expression would. Most uses of cty.Path.Apply ought to use
hcl.ApplyPath instead, to ensure that the behavior is consistent with what
users expect in the main language.
This commit is contained in:
Martin Atkins 2019-01-30 17:34:10 -08:00
parent a9aee4ba0f
commit c8d34b55ee
11 changed files with 615 additions and 613 deletions

4
go.mod
View File

@ -71,7 +71,7 @@ require (
github.com/hashicorp/go-version v1.0.0
github.com/hashicorp/golang-lru v0.5.0 // indirect
github.com/hashicorp/hcl v1.0.0
github.com/hashicorp/hcl2 v0.0.0-20190124230628-a9ca194bcdc3
github.com/hashicorp/hcl2 v0.0.0-20190130225218-89dbc5eb3d9e
github.com/hashicorp/hil v0.0.0-20170627220502-fa9f258a9250
github.com/hashicorp/logutils v0.0.0-20150609070431-0dc08b1671f3
github.com/hashicorp/memberlist v0.1.0 // indirect
@ -128,7 +128,7 @@ require (
github.com/xanzy/ssh-agent v0.2.0
github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18 // indirect
github.com/xlab/treeprint v0.0.0-20161029104018-1d6e34225557
github.com/zclconf/go-cty v0.0.0-20190124225737-a385d646c1e9
github.com/zclconf/go-cty v0.0.0-20190130221141-d7fe3fa0020f
go.opencensus.io v0.17.0 // indirect
go.uber.org/atomic v1.3.2 // indirect
go.uber.org/multierr v1.1.0 // indirect

6
go.sum
View File

@ -161,8 +161,8 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/hashicorp/hcl2 v0.0.0-20181208003705-670926858200/go.mod h1:ShfpTh661oAaxo7VcNxg0zcZW6jvMa7Moy2oFx7e5dE=
github.com/hashicorp/hcl2 v0.0.0-20190124230628-a9ca194bcdc3 h1:z8jV6t+XwhZ6NR70Fm5Pf2kvDP25b8gFQwJb5ndsnV4=
github.com/hashicorp/hcl2 v0.0.0-20190124230628-a9ca194bcdc3/go.mod h1:HtEzazM5AZ9fviNEof8QZB4T1Vz9UhHrGhnMPzl//Ek=
github.com/hashicorp/hcl2 v0.0.0-20190130225218-89dbc5eb3d9e h1:wcDATcjAY0ebgNtuyt00GxJll5fCChrevvrIdguzhQQ=
github.com/hashicorp/hcl2 v0.0.0-20190130225218-89dbc5eb3d9e/go.mod h1:HtEzazM5AZ9fviNEof8QZB4T1Vz9UhHrGhnMPzl//Ek=
github.com/hashicorp/hil v0.0.0-20170627220502-fa9f258a9250 h1:fooK5IvDL/KIsi4LxF/JH68nVdrBSiGNPhS2JAQjtjo=
github.com/hashicorp/hil v0.0.0-20170627220502-fa9f258a9250/go.mod h1:KHvg/R2/dPtaePb16oW4qIyzkMxXOL38xjRN64adsts=
github.com/hashicorp/logutils v0.0.0-20150609070431-0dc08b1671f3 h1:oD64EFjELI9RY9yoWlfua58r+etdnoIC871z+rr6lkA=
@ -325,6 +325,8 @@ github.com/xlab/treeprint v0.0.0-20161029104018-1d6e34225557/go.mod h1:ce1O1j6Ut
github.com/zclconf/go-cty v0.0.0-20181129180422-88fbe721e0f8/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s=
github.com/zclconf/go-cty v0.0.0-20190124225737-a385d646c1e9 h1:hHCAGde+QfwbqXSAqOmBd4NlOrJ6nmjWp+Nu408ezD4=
github.com/zclconf/go-cty v0.0.0-20190124225737-a385d646c1e9/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s=
github.com/zclconf/go-cty v0.0.0-20190130221141-d7fe3fa0020f h1:QdzpIo5V8FV8SHsXCXpgSXOquZEF7YozbNcYnEnGZvA=
github.com/zclconf/go-cty v0.0.0-20190130221141-d7fe3fa0020f/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s=
go.opencensus.io v0.17.0 h1:2Cu88MYg+1LU+WVD+NWwYhyP0kKgRlN9QjWGaX0jKTE=
go.opencensus.io v0.17.0/go.mod h1:mp1VrMQxhlqqDpKvH4UcQUa4YwlzNmymAjPrDdfxNpI=
go.uber.org/atomic v1.3.2 h1:2Oa65PReHzfn29GpvgsYwloV9AVFHPDk8tYxt2c2tr4=

View File

@ -1,10 +1,10 @@
// line 1 "scan_string_lit.rl"
//line scan_string_lit.rl:1
package hclsyntax
// This file is generated from scan_string_lit.rl. DO NOT EDIT.
// line 9 "scan_string_lit.go"
//line scan_string_lit.go:9
var _hclstrtok_actions []byte = []byte{
0, 1, 0, 1, 1, 2, 1, 0,
}
@ -114,12 +114,12 @@ const hclstrtok_error int = 0
const hclstrtok_en_quoted int = 10
const hclstrtok_en_unquoted int = 4
// line 10 "scan_string_lit.rl"
//line scan_string_lit.rl:10
func scanStringLit(data []byte, quoted bool) [][]byte {
var ret [][]byte
// line 61 "scan_string_lit.rl"
//line scan_string_lit.rl:61
// Ragel state
p := 0 // "Pointer" into data
@ -144,11 +144,11 @@ func scanStringLit(data []byte, quoted bool) [][]byte {
ret = append(ret, data[ts:te])
}*/
// line 154 "scan_string_lit.go"
//line scan_string_lit.go:154
{
}
// line 158 "scan_string_lit.go"
//line scan_string_lit.go:158
{
var _klen int
var _trans int
@ -229,7 +229,7 @@ func scanStringLit(data []byte, quoted bool) [][]byte {
_acts++
switch _hclstrtok_actions[_acts-1] {
case 0:
// line 40 "scan_string_lit.rl"
//line scan_string_lit.rl:40
// If te is behind p then we've skipped over some literal
// characters which we must now return.
@ -239,12 +239,12 @@ func scanStringLit(data []byte, quoted bool) [][]byte {
ts = p
case 1:
// line 48 "scan_string_lit.rl"
//line scan_string_lit.rl:48
te = p
ret = append(ret, data[ts:te])
// line 255 "scan_string_lit.go"
//line scan_string_lit.go:253
}
}
@ -267,12 +267,12 @@ func scanStringLit(data []byte, quoted bool) [][]byte {
__acts++
switch _hclstrtok_actions[__acts-1] {
case 1:
// line 48 "scan_string_lit.rl"
//line scan_string_lit.rl:48
te = p
ret = append(ret, data[ts:te])
// line 281 "scan_string_lit.go"
//line scan_string_lit.go:278
}
}
}
@ -282,7 +282,7 @@ func scanStringLit(data []byte, quoted bool) [][]byte {
}
}
// line 89 "scan_string_lit.rl"
//line scan_string_lit.rl:89
if te < p {
// Collect any leftover literal characters at the end of the input

File diff suppressed because it is too large Load Diff

View File

@ -9,7 +9,7 @@ import (
// This file is generated from scan_tokens.rl. DO NOT EDIT.
%%{
# (except you are actually in scan_tokens.rl here, so edit away!)
# (except when you are actually in scan_tokens.rl here, so edit away!)
machine hcltok;
write data;
@ -44,7 +44,7 @@ func scanTokens(data []byte, filename string, start hcl.Pos, mode scanMode) []To
Ident = (ID_Start | '_') (ID_Continue | '-')*;
# Symbols that just represent themselves are handled as a single rule.
SelfToken = "[" | "]" | "(" | ")" | "." | "," | "*" | "/" | "%" | "+" | "-" | "=" | "<" | ">" | "!" | "?" | ":" | "\n" | "&" | "|" | "~" | "^" | ";" | "`";
SelfToken = "[" | "]" | "(" | ")" | "." | "," | "*" | "/" | "%" | "+" | "-" | "=" | "<" | ">" | "!" | "?" | ":" | "\n" | "&" | "|" | "~" | "^" | ";" | "`" | "'";
EqualOp = "==";
NotEqual = "!=";

View File

@ -90,6 +90,7 @@ const (
TokenBitwiseNot TokenType = '~'
TokenBitwiseXor TokenType = '^'
TokenStarStar TokenType = '➚'
TokenApostrophe TokenType = '\''
TokenBacktick TokenType = '`'
TokenSemicolon TokenType = ';'
TokenTabs TokenType = '␉'
@ -183,11 +184,15 @@ func checkInvalidTokens(tokens Tokens) hcl.Diagnostics {
toldBitwise := 0
toldExponent := 0
toldBacktick := 0
toldApostrophe := 0
toldSemicolon := 0
toldTabs := 0
toldBadUTF8 := 0
for _, tok := range tokens {
// copy token so it's safe to point to it
tok := tok
switch tok.Type {
case TokenBitwiseAnd, TokenBitwiseOr, TokenBitwiseXor, TokenBitwiseNot:
if toldBitwise < 4 {
@ -223,16 +228,30 @@ func checkInvalidTokens(tokens Tokens) hcl.Diagnostics {
case TokenBacktick:
// Only report for alternating (even) backticks, so we won't report both start and ends of the same
// backtick-quoted string.
if toldExponent < 4 && (toldExponent%2) == 0 {
if (toldBacktick % 2) == 0 {
diags = append(diags, &hcl.Diagnostic{
Severity: hcl.DiagError,
Summary: "Invalid character",
Detail: "The \"`\" character is not valid. To create a multi-line string, use the \"heredoc\" syntax, like \"<<EOT\".",
Subject: &tok.Range,
})
}
if toldBacktick <= 2 {
toldBacktick++
}
case TokenApostrophe:
if (toldApostrophe % 2) == 0 {
newDiag := &hcl.Diagnostic{
Severity: hcl.DiagError,
Summary: "Invalid character",
Detail: "Single quotes are not valid. Use double quotes (\") to enclose strings.",
Subject: &tok.Range,
}
diags = append(diags, newDiag)
}
if toldApostrophe <= 2 {
toldApostrophe++
}
case TokenSemicolon:
if toldSemicolon < 1 {
diags = append(diags, &hcl.Diagnostic{
@ -273,8 +292,6 @@ func checkInvalidTokens(tokens Tokens) hcl.Diagnostics {
Detail: "This character is not used within the language.",
Subject: &tok.Range,
})
toldTabs++
}
}
return diags

View File

@ -4,7 +4,7 @@ package hclsyntax
import "strconv"
const _TokenType_name = "TokenNilTokenNewlineTokenBangTokenPercentTokenBitwiseAndTokenOParenTokenCParenTokenStarTokenPlusTokenCommaTokenMinusTokenDotTokenSlashTokenColonTokenSemicolonTokenLessThanTokenEqualTokenGreaterThanTokenQuestionTokenCommentTokenOHeredocTokenIdentTokenNumberLitTokenQuotedLitTokenStringLitTokenOBrackTokenCBrackTokenBitwiseXorTokenBacktickTokenCHeredocTokenOBraceTokenBitwiseOrTokenCBraceTokenBitwiseNotTokenOQuoteTokenCQuoteTokenTemplateControlTokenEllipsisTokenFatArrowTokenTemplateSeqEndTokenAndTokenOrTokenTemplateInterpTokenEqualOpTokenNotEqualTokenLessThanEqTokenGreaterThanEqTokenEOFTokenTabsTokenStarStarTokenInvalidTokenBadUTF8"
const _TokenType_name = "TokenNilTokenNewlineTokenBangTokenPercentTokenBitwiseAndTokenApostropheTokenOParenTokenCParenTokenStarTokenPlusTokenCommaTokenMinusTokenDotTokenSlashTokenColonTokenSemicolonTokenLessThanTokenEqualTokenGreaterThanTokenQuestionTokenCommentTokenOHeredocTokenIdentTokenNumberLitTokenQuotedLitTokenStringLitTokenOBrackTokenCBrackTokenBitwiseXorTokenBacktickTokenCHeredocTokenOBraceTokenBitwiseOrTokenCBraceTokenBitwiseNotTokenOQuoteTokenCQuoteTokenTemplateControlTokenEllipsisTokenFatArrowTokenTemplateSeqEndTokenAndTokenOrTokenTemplateInterpTokenEqualOpTokenNotEqualTokenLessThanEqTokenGreaterThanEqTokenEOFTokenTabsTokenStarStarTokenInvalidTokenBadUTF8"
var _TokenType_map = map[TokenType]string{
0: _TokenType_name[0:8],
@ -12,53 +12,54 @@ var _TokenType_map = map[TokenType]string{
33: _TokenType_name[20:29],
37: _TokenType_name[29:41],
38: _TokenType_name[41:56],
40: _TokenType_name[56:67],
41: _TokenType_name[67:78],
42: _TokenType_name[78:87],
43: _TokenType_name[87:96],
44: _TokenType_name[96:106],
45: _TokenType_name[106:116],
46: _TokenType_name[116:124],
47: _TokenType_name[124:134],
58: _TokenType_name[134:144],
59: _TokenType_name[144:158],
60: _TokenType_name[158:171],
61: _TokenType_name[171:181],
62: _TokenType_name[181:197],
63: _TokenType_name[197:210],
67: _TokenType_name[210:222],
72: _TokenType_name[222:235],
73: _TokenType_name[235:245],
78: _TokenType_name[245:259],
81: _TokenType_name[259:273],
83: _TokenType_name[273:287],
91: _TokenType_name[287:298],
93: _TokenType_name[298:309],
94: _TokenType_name[309:324],
96: _TokenType_name[324:337],
104: _TokenType_name[337:350],
123: _TokenType_name[350:361],
124: _TokenType_name[361:375],
125: _TokenType_name[375:386],
126: _TokenType_name[386:401],
171: _TokenType_name[401:412],
187: _TokenType_name[412:423],
955: _TokenType_name[423:443],
8230: _TokenType_name[443:456],
8658: _TokenType_name[456:469],
8718: _TokenType_name[469:488],
8743: _TokenType_name[488:496],
8744: _TokenType_name[496:503],
8747: _TokenType_name[503:522],
8788: _TokenType_name[522:534],
8800: _TokenType_name[534:547],
8804: _TokenType_name[547:562],
8805: _TokenType_name[562:580],
9220: _TokenType_name[580:588],
9225: _TokenType_name[588:597],
10138: _TokenType_name[597:610],
65533: _TokenType_name[610:622],
128169: _TokenType_name[622:634],
39: _TokenType_name[56:71],
40: _TokenType_name[71:82],
41: _TokenType_name[82:93],
42: _TokenType_name[93:102],
43: _TokenType_name[102:111],
44: _TokenType_name[111:121],
45: _TokenType_name[121:131],
46: _TokenType_name[131:139],
47: _TokenType_name[139:149],
58: _TokenType_name[149:159],
59: _TokenType_name[159:173],
60: _TokenType_name[173:186],
61: _TokenType_name[186:196],
62: _TokenType_name[196:212],
63: _TokenType_name[212:225],
67: _TokenType_name[225:237],
72: _TokenType_name[237:250],
73: _TokenType_name[250:260],
78: _TokenType_name[260:274],
81: _TokenType_name[274:288],
83: _TokenType_name[288:302],
91: _TokenType_name[302:313],
93: _TokenType_name[313:324],
94: _TokenType_name[324:339],
96: _TokenType_name[339:352],
104: _TokenType_name[352:365],
123: _TokenType_name[365:376],
124: _TokenType_name[376:390],
125: _TokenType_name[390:401],
126: _TokenType_name[401:416],
171: _TokenType_name[416:427],
187: _TokenType_name[427:438],
955: _TokenType_name[438:458],
8230: _TokenType_name[458:471],
8658: _TokenType_name[471:484],
8718: _TokenType_name[484:503],
8743: _TokenType_name[503:511],
8744: _TokenType_name[511:518],
8747: _TokenType_name[518:537],
8788: _TokenType_name[537:549],
8800: _TokenType_name[549:562],
8804: _TokenType_name[562:577],
8805: _TokenType_name[577:595],
9220: _TokenType_name[595:603],
9225: _TokenType_name[603:612],
10138: _TokenType_name[612:625],
65533: _TokenType_name[625:637],
128169: _TokenType_name[637:649],
}
func (i TokenType) String() string {

View File

@ -145,3 +145,122 @@ func Index(collection, key cty.Value, srcRange *Range) (cty.Value, Diagnostics)
}
}
// GetAttr is a helper function that performs the same operation as the
// attribute access in the HCL expression language. That is, the result is the
// same as it would be for obj.attr in a configuration expression.
//
// This is exported so that applications can access attributes in a manner
// consistent with how the language does it, including handling of null and
// unknown values, etc.
//
// Diagnostics are produced if the given combination of values is not valid.
// Therefore a pointer to a source range must be provided to use in diagnostics,
// though nil can be provided if the calling application is going to
// ignore the subject of the returned diagnostics anyway.
func GetAttr(obj cty.Value, attrName string, srcRange *Range) (cty.Value, Diagnostics) {
if obj.IsNull() {
return cty.DynamicVal, Diagnostics{
{
Severity: DiagError,
Summary: "Attempt to get attribute from null value",
Detail: "This value is null, so it does not have any attributes.",
Subject: srcRange,
},
}
}
ty := obj.Type()
switch {
case ty.IsObjectType():
if !ty.HasAttribute(attrName) {
return cty.DynamicVal, Diagnostics{
{
Severity: DiagError,
Summary: "Unsupported attribute",
Detail: fmt.Sprintf("This object does not have an attribute named %q.", attrName),
Subject: srcRange,
},
}
}
if !obj.IsKnown() {
return cty.UnknownVal(ty.AttributeType(attrName)), nil
}
return obj.GetAttr(attrName), nil
case ty.IsMapType():
if !obj.IsKnown() {
return cty.UnknownVal(ty.ElementType()), nil
}
idx := cty.StringVal(attrName)
if obj.HasIndex(idx).False() {
return cty.DynamicVal, Diagnostics{
{
Severity: DiagError,
Summary: "Missing map element",
Detail: fmt.Sprintf("This map does not have an element with the key %q.", attrName),
Subject: srcRange,
},
}
}
return obj.Index(idx), nil
case ty == cty.DynamicPseudoType:
return cty.DynamicVal, nil
default:
return cty.DynamicVal, Diagnostics{
{
Severity: DiagError,
Summary: "Unsupported attribute",
Detail: "This value does not have any attributes.",
Subject: srcRange,
},
}
}
}
// ApplyPath is a helper function that applies a cty.Path to a value using the
// indexing and attribute access operations from HCL.
//
// This is similar to calling the path's own Apply method, but ApplyPath uses
// the more relaxed typing rules that apply to these operations in HCL, rather
// than cty's relatively-strict rules. ApplyPath is implemented in terms of
// Index and GetAttr, and so it has the same behavior for individual steps
// but will stop and return any errors returned by intermediate steps.
//
// Diagnostics are produced if the given path cannot be applied to the given
// value. Therefore a pointer to a source range must be provided to use in
// diagnostics, though nil can be provided if the calling application is going
// to ignore the subject of the returned diagnostics anyway.
func ApplyPath(val cty.Value, path cty.Path, srcRange *Range) (cty.Value, Diagnostics) {
var diags Diagnostics
for _, step := range path {
var stepDiags Diagnostics
switch ts := step.(type) {
case cty.IndexStep:
val, stepDiags = Index(val, ts.Key, srcRange)
case cty.GetAttrStep:
val, stepDiags = GetAttr(val, ts.Name, srcRange)
default:
// Should never happen because the above are all of the step types.
diags = diags.Append(&Diagnostic{
Severity: DiagError,
Summary: "Invalid path step",
Detail: fmt.Sprintf("Go type %T is not a valid path step. This is a bug in this program.", step),
Subject: srcRange,
})
return cty.DynamicVal, diags
}
diags = append(diags, stepDiags...)
if stepDiags.HasErrors() {
return cty.DynamicVal, diags
}
}
return val, diags
}

View File

@ -255,66 +255,7 @@ type TraverseAttr struct {
}
func (tn TraverseAttr) TraversalStep(val cty.Value) (cty.Value, Diagnostics) {
if val.IsNull() {
return cty.DynamicVal, Diagnostics{
{
Severity: DiagError,
Summary: "Attempt to get attribute from null value",
Detail: "This value is null, so it does not have any attributes.",
Subject: &tn.SrcRange,
},
}
}
ty := val.Type()
switch {
case ty.IsObjectType():
if !ty.HasAttribute(tn.Name) {
return cty.DynamicVal, Diagnostics{
{
Severity: DiagError,
Summary: "Unsupported attribute",
Detail: fmt.Sprintf("This object does not have an attribute named %q.", tn.Name),
Subject: &tn.SrcRange,
},
}
}
if !val.IsKnown() {
return cty.UnknownVal(ty.AttributeType(tn.Name)), nil
}
return val.GetAttr(tn.Name), nil
case ty.IsMapType():
if !val.IsKnown() {
return cty.UnknownVal(ty.ElementType()), nil
}
idx := cty.StringVal(tn.Name)
if val.HasIndex(idx).False() {
return cty.DynamicVal, Diagnostics{
{
Severity: DiagError,
Summary: "Missing map element",
Detail: fmt.Sprintf("This map does not have an element with the key %q.", tn.Name),
Subject: &tn.SrcRange,
},
}
}
return val.Index(idx), nil
case ty == cty.DynamicPseudoType:
return cty.DynamicVal, nil
default:
return cty.DynamicVal, Diagnostics{
{
Severity: DiagError,
Summary: "Unsupported attribute",
Detail: "This value does not have any attributes.",
Subject: &tn.SrcRange,
},
}
}
return GetAttr(val, tn.Name, &tn.SrcRange)
}
func (tn TraverseAttr) SourceRange() Range {

View File

@ -136,9 +136,13 @@ type IndexStep struct {
// Apply returns the value resulting from indexing the given value with
// our key value.
func (s IndexStep) Apply(val Value) (Value, error) {
if val == NilVal || val.IsNull() {
return NilVal, errors.New("cannot index a null value")
}
switch s.Key.Type() {
case Number:
if !val.Type().IsListType() {
if !(val.Type().IsListType() || val.Type().IsTupleType()) {
return NilVal, errors.New("not a list type")
}
case String:
@ -174,6 +178,10 @@ type GetAttrStep struct {
// Apply returns the value of our named attribute from the given value, which
// must be of an object type that has a value of that name.
func (s GetAttrStep) Apply(val Value) (Value, error) {
if val == NilVal || val.IsNull() {
return NilVal, errors.New("cannot access attributes on a null value")
}
if !val.Type().IsObjectType() {
return NilVal, errors.New("not an object type")
}

4
vendor/modules.txt vendored
View File

@ -351,7 +351,7 @@ github.com/hashicorp/hcl/hcl/scanner
github.com/hashicorp/hcl/hcl/strconv
github.com/hashicorp/hcl/json/scanner
github.com/hashicorp/hcl/json/token
# github.com/hashicorp/hcl2 v0.0.0-20190124230628-a9ca194bcdc3
# github.com/hashicorp/hcl2 v0.0.0-20190130225218-89dbc5eb3d9e
github.com/hashicorp/hcl2/hcl
github.com/hashicorp/hcl2/hcl/hclsyntax
github.com/hashicorp/hcl2/hcldec
@ -482,7 +482,7 @@ github.com/vmihailenco/msgpack/codes
github.com/xanzy/ssh-agent
# github.com/xlab/treeprint v0.0.0-20161029104018-1d6e34225557
github.com/xlab/treeprint
# github.com/zclconf/go-cty v0.0.0-20190124225737-a385d646c1e9
# github.com/zclconf/go-cty v0.0.0-20190130221141-d7fe3fa0020f
github.com/zclconf/go-cty/cty
github.com/zclconf/go-cty/cty/gocty
github.com/zclconf/go-cty/cty/convert