diff --git a/go.mod b/go.mod index 9d5ca8f..89859fc 100644 --- a/go.mod +++ b/go.mod @@ -7,5 +7,5 @@ require ( github.com/hashicorp/terraform v0.14.10 github.com/stretchr/testify v1.7.0 github.com/zclconf/go-cty v1.8.1 - github.com/zclconf/go-cty-yaml v1.0.2 + github.com/zclconf/go-cty-yaml v1.0.3 ) diff --git a/go.sum b/go.sum index 672b2a0..2c28f2f 100644 --- a/go.sum +++ b/go.sum @@ -403,8 +403,9 @@ github.com/zclconf/go-cty v1.8.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUA github.com/zclconf/go-cty v1.8.1 h1:SI0LqNeNxAgv2WWqWJMlG2/Ad/6aYJ7IVYYMigmfkuI= github.com/zclconf/go-cty v1.8.1/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8= -github.com/zclconf/go-cty-yaml v1.0.2 h1:dNyg4QLTrv2IfJpm7Wtxi55ed5gLGOlPrZ6kMd51hY0= github.com/zclconf/go-cty-yaml v1.0.2/go.mod h1:IP3Ylp0wQpYm50IHK8OZWKMu6sPJIUgKa8XhiVHura0= +github.com/zclconf/go-cty-yaml v1.0.3 h1:og/eOQ7lvA/WWhHGFETVWNduJM7Rjsv2RRpx1sdFMLc= +github.com/zclconf/go-cty-yaml v1.0.3/go.mod h1:9YLUH4g7lOhVWqUbctnVlZ5KLpg7JAprQNgxSZ1Gyxs= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= diff --git a/vendor/github.com/zclconf/go-cty-yaml/CHANGELOG.md b/vendor/github.com/zclconf/go-cty-yaml/CHANGELOG.md index b329bd0..d3b97a5 100644 --- a/vendor/github.com/zclconf/go-cty-yaml/CHANGELOG.md +++ b/vendor/github.com/zclconf/go-cty-yaml/CHANGELOG.md @@ -1,3 +1,10 @@ +# 1.0.3 (November 2, 2022) + +* The `YAMLDecodeFunc` cty function now correctly handles both entirely empty + documents and explicit top-level nulls. Previously it would always return + an unknown value in those cases; it now returns a null value as intended. + ([#7](https://github.com/zclconf/go-cty-yaml/pull/7)) + # 1.0.2 (June 17, 2020) * The YAML decoder now follows the YAML specification more closely when parsing diff --git a/vendor/github.com/zclconf/go-cty-yaml/converter.go b/vendor/github.com/zclconf/go-cty-yaml/converter.go index a73b34a..fc5d3d8 100644 --- a/vendor/github.com/zclconf/go-cty-yaml/converter.go +++ b/vendor/github.com/zclconf/go-cty-yaml/converter.go @@ -62,8 +62,8 @@ func (c *Converter) Marshal(v cty.Value) ([]byte, error) { // and attempts to convert it into a value conforming to the given type // constraint. // -// An error is returned if the given source contains any YAML document -// delimiters. +// An error is returned if the given source contains more than one YAML +// document. func (c *Converter) Unmarshal(src []byte, ty cty.Type) (cty.Value, error) { return c.unmarshal(src, ty) } diff --git a/vendor/github.com/zclconf/go-cty-yaml/cty_funcs.go b/vendor/github.com/zclconf/go-cty-yaml/cty_funcs.go index b91141c..e47890c 100644 --- a/vendor/github.com/zclconf/go-cty-yaml/cty_funcs.go +++ b/vendor/github.com/zclconf/go-cty-yaml/cty_funcs.go @@ -25,9 +25,6 @@ var YAMLDecodeFunc = function.New(&function.Spec{ return Standard.ImpliedType([]byte(args[0].AsString())) }, Impl: func(args []cty.Value, retType cty.Type) (cty.Value, error) { - if retType == cty.DynamicPseudoType { - return cty.DynamicVal, nil - } return Standard.Unmarshal([]byte(args[0].AsString()), retType) }, }) diff --git a/vendor/github.com/zclconf/go-cty-yaml/go.mod b/vendor/github.com/zclconf/go-cty-yaml/go.mod index 3d52268..d7ee5b4 100644 --- a/vendor/github.com/zclconf/go-cty-yaml/go.mod +++ b/vendor/github.com/zclconf/go-cty-yaml/go.mod @@ -1,3 +1,7 @@ module github.com/zclconf/go-cty-yaml +go 1.17 + require github.com/zclconf/go-cty v1.0.0 + +require golang.org/x/text v0.3.0 // indirect diff --git a/vendor/github.com/zclconf/go-cty-yaml/go.sum b/vendor/github.com/zclconf/go-cty-yaml/go.sum index 841f7fc..914c2b2 100644 --- a/vendor/github.com/zclconf/go-cty-yaml/go.sum +++ b/vendor/github.com/zclconf/go-cty-yaml/go.sum @@ -1,9 +1,7 @@ github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk= github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= @@ -14,5 +12,4 @@ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/vendor/modules.txt b/vendor/modules.txt index 299f7f9..58159fd 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -45,7 +45,7 @@ github.com/zclconf/go-cty/cty/function/stdlib github.com/zclconf/go-cty/cty/gocty github.com/zclconf/go-cty/cty/json github.com/zclconf/go-cty/cty/set -# github.com/zclconf/go-cty-yaml v1.0.2 +# github.com/zclconf/go-cty-yaml v1.0.3 ## explicit github.com/zclconf/go-cty-yaml # golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9