Skip to content

Commit a95f5e5

Browse files
paddycarverPaddy
authored andcommitted
Use tfjson's new optional json.Number behavior.
Use the tagged release of tfjson, and opt into the json.Number handling.
1 parent 272df8b commit a95f5e5

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

go.mod

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ require (
2525
github.com/hashicorp/go-version v1.2.1
2626
github.com/hashicorp/hcl/v2 v2.3.0
2727
github.com/hashicorp/logutils v1.0.0
28-
github.com/hashicorp/terraform-exec v0.11.1-0.20201216194308-834cb4cce1d3
29-
github.com/hashicorp/terraform-json v0.7.1-0.20201216193920-93fe74c2941e
28+
github.com/hashicorp/terraform-exec v0.11.1-0.20201216215126-3644a78ac896
29+
github.com/hashicorp/terraform-json v0.8.0
3030
github.com/hashicorp/terraform-plugin-go v0.1.0
3131
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect
3232
github.com/keybase/go-crypto v0.0.0-20161004153544-93f5b35093ba
@@ -42,3 +42,7 @@ require (
4242
golang.org/x/tools v0.0.0-20200713011307-fd294ab11aed
4343
google.golang.org/grpc v1.32.0
4444
)
45+
46+
replace github.com/hashicorp/terraform-json => ../terraform-json
47+
48+
replace github.com/hashicorp/terraform-exec => ../terraform-exec

go.sum

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,6 @@ github.com/hashicorp/hcl/v2 v2.3.0 h1:iRly8YaMwTBAKhn1Ybk7VSdzbnopghktCD031P8ggU
200200
github.com/hashicorp/hcl/v2 v2.3.0/go.mod h1:d+FwDBbOLvpAM3Z6J7gPj/VoAGkNe/gm352ZhjJ/Zv8=
201201
github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y=
202202
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
203-
github.com/hashicorp/terraform-exec v0.11.1-0.20201216194308-834cb4cce1d3 h1:WJyc/gjJl+313zgUw2XIKUg0Rpn7MuZEyuHHTHoLp20=
204-
github.com/hashicorp/terraform-exec v0.11.1-0.20201216194308-834cb4cce1d3/go.mod h1:HXWkZcOyyEcYWZzed3S5ZvBVO2AqamHV+31KMV1fjog=
205-
github.com/hashicorp/terraform-json v0.7.1-0.20201216193920-93fe74c2941e h1:eRFeH76HcGTdZ0+Y/tG4BoVUKEg52rXPf9aPDd1DGHU=
206-
github.com/hashicorp/terraform-json v0.7.1-0.20201216193920-93fe74c2941e/go.mod h1:3defM4kkMfttwiE7VakJDwCd4R+umhSQnvJwORXbprE=
207203
github.com/hashicorp/terraform-plugin-go v0.1.0 h1:kyXZ0nkHxiRev/q18N40IbRRk4AV0zE/MDJkDM3u8dY=
208204
github.com/hashicorp/terraform-plugin-go v0.1.0/go.mod h1:10V6F3taeDWVAoLlkmArKttR3IULlRWFAGtQIQTIDr4=
209205
github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM=

helper/resource/testing_new_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,6 +1086,7 @@ func TestShimState(t *testing.T) {
10861086
for i, tc := range testCases {
10871087
t.Run(fmt.Sprintf("%d-%s", i, tc.Name), func(t *testing.T) {
10881088
var rawState tfjson.State
1089+
rawState.UseJSONNumber(true)
10891090

10901091
err := unmarshalJSON([]byte(tc.RawState), &rawState)
10911092
if err != nil {

0 commit comments

Comments
 (0)