Skip to content

Commit

Permalink
chore: use terramate-io/hcl fork. (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
i4ki authored Aug 29, 2024
2 parents 99b6e3e + 2396bbe commit b33a95f
Show file tree
Hide file tree
Showing 232 changed files with 375 additions and 377 deletions.
4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ require (
github.com/hashicorp/go-uuid v1.0.3
github.com/hashicorp/go-version v1.6.0
github.com/hashicorp/hcl v1.0.0
github.com/hashicorp/hcl/v2 v2.20.1
github.com/hashicorp/jsonapi v0.0.0-20210826224640-ee7dae0fb22d
github.com/hashicorp/terraform-svchost v0.1.1
github.com/jmespath/go-jmespath v0.4.0
Expand Down Expand Up @@ -80,6 +79,7 @@ require (
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/sts v1.0.588
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tag v1.0.233
github.com/tencentyun/cos-go-sdk-v5 v0.7.29
github.com/terramate-io/hcl/v2 v2.0.0-rc2
github.com/tombuildsstuff/giovanni v0.15.1
github.com/xanzy/ssh-agent v0.3.1
github.com/xlab/treeprint v0.0.0-20161029104018-1d6e34225557
Expand Down Expand Up @@ -267,5 +267,3 @@ require (
)

go 1.21

replace github.com/hashicorp/hcl/v2 v2.20.1 => github.com/opentofu/hcl/v2 v2.0.0-20240814143621-8048794c5c52
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -923,8 +923,6 @@ github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE=
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
github.com/openbao/openbao/api v0.0.0-20240326035453-c075f0ef2c7e h1:LIQFfqW6BA5E2ycx8NNDgyKh0exFubHePM5pF3knogo=
github.com/openbao/openbao/api v0.0.0-20240326035453-c075f0ef2c7e/go.mod h1:NUvBdXCNlmAGQ9TbYV7vS1Y9awHAjrq3QLiBWV+4Glk=
github.com/opentofu/hcl/v2 v2.0.0-20240814143621-8048794c5c52 h1:5O3LYVJxOHh7wfp/f3Em9EVMAK22dv7+bPj/k1hRamg=
github.com/opentofu/hcl/v2 v2.0.0-20240814143621-8048794c5c52/go.mod h1:62ZYHrXgPoX8xBnzl8QzbWq4dyDsDtfCRgIq1rbJEvA=
github.com/opentofu/registry-address v0.0.0-20230920144404-f1e51167f633 h1:81TBkM/XGIFlVvyabp0CJl00UHeVUiQjz0fddLMi848=
github.com/opentofu/registry-address v0.0.0-20230920144404-f1e51167f633/go.mod h1:HzQhpVo/NJnGmN+7FPECCVCA5ijU7AUcvf39enBKYOc=
github.com/packer-community/winrmcp v0.0.0-20180921211025-c76d91c1e7db h1:9uViuKtx1jrlXLBW/pMnhOfzn3iSEdLase/But/IZRU=
Expand Down Expand Up @@ -1026,6 +1024,8 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tag v1.0.233 h1:5Tbi+jy
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tag v1.0.233/go.mod h1:sX14+NSvMjOhNFaMtP2aDy6Bss8PyFXij21gpY6+DAs=
github.com/tencentyun/cos-go-sdk-v5 v0.7.29 h1:uwRBzc70Wgtc5iQQCowqecfRT0OpCXUOZzodZHOOEDs=
github.com/tencentyun/cos-go-sdk-v5 v0.7.29/go.mod h1:4E4+bQ2gBVJcgEC9Cufwylio4mXOct2iu05WjgEBx1o=
github.com/terramate-io/hcl/v2 v2.0.0-rc2 h1:vI5rWl1hiFKKijOZvrryWmk94PiTtW6QHyBssMYuf3U=
github.com/terramate-io/hcl/v2 v2.0.0-rc2/go.mod h1:5M0ouzGQXtZ6hnSkVPudYu1EQixH6AfFuPDqqjIkwQU=
github.com/thanhpk/randstr v1.0.4 h1:IN78qu/bR+My+gHCvMEXhR/i5oriVHcTB/BJJIRTsNo=
github.com/thanhpk/randstr v1.0.4/go.mod h1:M/H2P1eNLZzlDwAzpkkkUvoyNNMbzRGhESZuEQk3r0U=
github.com/thlib/go-timezone-local v0.0.0-20210907160436-ef149e42d28e h1:BuzhfgfWQbX0dWzYzT1zsORLnHRv3bcRcsaUk0VmXA8=
Expand Down
2 changes: 1 addition & 1 deletion internal/addrs/check_rule_diagnostic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ package addrs
import (
"testing"

"github.com/hashicorp/hcl/v2"
"github.com/terramate-io/hcl/v2"

"github.com/terramate-io/opentofulib/internal/tfdiags"
)
Expand Down
4 changes: 2 additions & 2 deletions internal/addrs/checkable.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"golang.org/x/text/cases"
"golang.org/x/text/language"

"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/hcl/v2/hclsyntax"
"github.com/terramate-io/hcl/v2"
"github.com/terramate-io/hcl/v2/hclsyntax"

"github.com/terramate-io/opentofulib/internal/tfdiags"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/addrs/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ package addrs
import (
"strings"

"github.com/hashicorp/hcl/v2"
"github.com/terramate-io/hcl/v2"
"github.com/terramate-io/opentofulib/internal/tfdiags"
)

Expand Down
4 changes: 2 additions & 2 deletions internal/addrs/module_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"fmt"
"strings"

"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/hcl/v2/hclsyntax"
"github.com/terramate-io/hcl/v2"
"github.com/terramate-io/hcl/v2/hclsyntax"
"github.com/zclconf/go-cty/cty"
"github.com/zclconf/go-cty/cty/gocty"

Expand Down
4 changes: 2 additions & 2 deletions internal/addrs/module_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"testing"

"github.com/google/go-cmp/cmp"
"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/hcl/v2/hclsyntax"
"github.com/terramate-io/hcl/v2"
"github.com/terramate-io/hcl/v2/hclsyntax"
)

func TestModuleEqual_true(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/addrs/move_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ package addrs
import (
"fmt"

"github.com/hashicorp/hcl/v2"
"github.com/terramate-io/hcl/v2"
"github.com/terramate-io/opentofulib/internal/tfdiags"
)

Expand Down
4 changes: 2 additions & 2 deletions internal/addrs/move_endpoint_module_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"strings"
"testing"

"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/hcl/v2/hclsyntax"
"github.com/terramate-io/hcl/v2"
"github.com/terramate-io/hcl/v2/hclsyntax"
"github.com/terramate-io/opentofulib/internal/tfdiags"
)

Expand Down
4 changes: 2 additions & 2 deletions internal/addrs/move_endpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"testing"

"github.com/google/go-cmp/cmp"
"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/hcl/v2/hclsyntax"
"github.com/terramate-io/hcl/v2"
"github.com/terramate-io/hcl/v2/hclsyntax"
)

func TestParseMoveEndpoint(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions internal/addrs/output_value.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ package addrs
import (
"fmt"

"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/hcl/v2/hclsyntax"
"github.com/terramate-io/hcl/v2"
"github.com/terramate-io/hcl/v2/hclsyntax"

"github.com/terramate-io/opentofulib/internal/tfdiags"
)
Expand Down
4 changes: 2 additions & 2 deletions internal/addrs/parse_ref.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"fmt"
"strings"

"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/hcl/v2/hclsyntax"
"github.com/terramate-io/hcl/v2"
"github.com/terramate-io/hcl/v2/hclsyntax"
"github.com/zclconf/go-cty/cty"

"github.com/terramate-io/opentofulib/internal/tfdiags"
Expand Down
4 changes: 2 additions & 2 deletions internal/addrs/parse_ref_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"testing"

"github.com/go-test/deep"
"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/hcl/v2/hclsyntax"
"github.com/terramate-io/hcl/v2"
"github.com/terramate-io/hcl/v2/hclsyntax"
"github.com/zclconf/go-cty/cty"

"github.com/terramate-io/opentofulib/internal/tfdiags"
Expand Down
4 changes: 2 additions & 2 deletions internal/addrs/parse_target.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ package addrs
import (
"fmt"

"github.com/hashicorp/hcl/v2/hclsyntax"
"github.com/terramate-io/hcl/v2/hclsyntax"

"github.com/hashicorp/hcl/v2"
"github.com/terramate-io/hcl/v2"
"github.com/terramate-io/opentofulib/internal/tfdiags"
)

Expand Down
4 changes: 2 additions & 2 deletions internal/addrs/parse_target_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"testing"

"github.com/go-test/deep"
"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/hcl/v2/hclsyntax"
"github.com/terramate-io/hcl/v2"
"github.com/terramate-io/hcl/v2/hclsyntax"
"github.com/terramate-io/opentofulib/internal/tfdiags"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/addrs/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
package addrs

import (
"github.com/hashicorp/hcl/v2"
svchost "github.com/hashicorp/terraform-svchost"
tfaddr "github.com/opentofu/registry-address"
"github.com/terramate-io/hcl/v2"
"github.com/terramate-io/opentofulib/internal/tfdiags"
)

Expand Down
4 changes: 2 additions & 2 deletions internal/addrs/provider_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"github.com/terramate-io/opentofulib/internal/tfdiags"
"github.com/zclconf/go-cty/cty"

"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/hcl/v2/hclsyntax"
"github.com/terramate-io/hcl/v2"
"github.com/terramate-io/hcl/v2/hclsyntax"
)

// ProviderConfig is an interface type whose dynamic type can be either
Expand Down
4 changes: 2 additions & 2 deletions internal/addrs/provider_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (

"github.com/go-test/deep"

"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/hcl/v2/hclsyntax"
"github.com/terramate-io/hcl/v2"
"github.com/terramate-io/hcl/v2/hclsyntax"
)

func TestParseAbsProviderConfig(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/addrs/remove_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
package addrs

import (
"github.com/hashicorp/hcl/v2"
"github.com/terramate-io/hcl/v2"
"github.com/terramate-io/opentofulib/internal/tfdiags"
)

Expand Down
4 changes: 2 additions & 2 deletions internal/addrs/remove_endpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"testing"

"github.com/google/go-cmp/cmp"
"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/hcl/v2/hclsyntax"
"github.com/terramate-io/hcl/v2"
"github.com/terramate-io/hcl/v2/hclsyntax"
)

func TestParseRemoveEndpoint(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/addrs/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"fmt"
"strings"

"github.com/hashicorp/hcl/v2"
"github.com/terramate-io/hcl/v2"
"github.com/terramate-io/opentofulib/internal/tfdiags"
)

Expand Down
4 changes: 2 additions & 2 deletions internal/addrs/resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"testing"

"github.com/google/go-cmp/cmp"
"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/hcl/v2/hclsyntax"
"github.com/terramate-io/hcl/v2"
"github.com/terramate-io/hcl/v2/hclsyntax"
)

func TestResourceEqual_true(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/backend/local/backend_local.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"sort"
"strings"

"github.com/hashicorp/hcl/v2"
"github.com/terramate-io/hcl/v2"
"github.com/zclconf/go-cty/cty"

"github.com/terramate-io/opentofulib/internal/backend"
Expand Down
2 changes: 1 addition & 1 deletion internal/backend/remote-state/inmem/backend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"os"
"testing"

"github.com/hashicorp/hcl/v2"
"github.com/terramate-io/hcl/v2"

"github.com/terramate-io/opentofulib/internal/backend"
"github.com/terramate-io/opentofulib/internal/encryption"
Expand Down
2 changes: 1 addition & 1 deletion internal/backend/remote-state/inmem/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ package inmem
import (
"testing"

"github.com/hashicorp/hcl/v2"
"github.com/terramate-io/hcl/v2"
"github.com/terramate-io/opentofulib/internal/backend"
"github.com/terramate-io/opentofulib/internal/encryption"
"github.com/terramate-io/opentofulib/internal/states/remote"
Expand Down
2 changes: 1 addition & 1 deletion internal/backend/remote-state/pg/backend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
"strings"
"testing"

"github.com/hashicorp/hcl/v2/hcldec"
"github.com/lib/pq"
"github.com/terramate-io/hcl/v2/hcldec"
"github.com/terramate-io/opentofulib/internal/backend"
"github.com/terramate-io/opentofulib/internal/encryption"
"github.com/terramate-io/opentofulib/internal/states/remote"
Expand Down
4 changes: 2 additions & 2 deletions internal/backend/remote/backend_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"strings"

tfe "github.com/hashicorp/go-tfe"
"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/hcl/v2/hclsyntax"
"github.com/terramate-io/hcl/v2"
"github.com/terramate-io/hcl/v2/hclsyntax"
"github.com/terramate-io/opentofulib/internal/backend"
"github.com/terramate-io/opentofulib/internal/configs"
"github.com/terramate-io/opentofulib/internal/states/statemgr"
Expand Down
4 changes: 2 additions & 2 deletions internal/backend/testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"testing"

uuid "github.com/hashicorp/go-uuid"
"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/hcl/v2/hcldec"
"github.com/terramate-io/hcl/v2"
"github.com/terramate-io/hcl/v2/hcldec"

"github.com/terramate-io/opentofulib/internal/addrs"
"github.com/terramate-io/opentofulib/internal/configs"
Expand Down
2 changes: 1 addition & 1 deletion internal/backend/unparsed_value.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ package backend
import (
"fmt"

"github.com/hashicorp/hcl/v2"
"github.com/terramate-io/hcl/v2"
"github.com/terramate-io/opentofulib/internal/configs"
"github.com/terramate-io/opentofulib/internal/tfdiags"
"github.com/terramate-io/opentofulib/internal/tofu"
Expand Down
2 changes: 1 addition & 1 deletion internal/backend/unparsed_value_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"testing"

"github.com/google/go-cmp/cmp"
"github.com/hashicorp/hcl/v2"
"github.com/terramate-io/hcl/v2"
"github.com/zclconf/go-cty/cty"

"github.com/terramate-io/opentofulib/internal/configs"
Expand Down
4 changes: 2 additions & 2 deletions internal/cloud/backend_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (
"fmt"
"log"

"github.com/hashicorp/hcl/v2"
"github.com/terramate-io/hcl/v2"

tfe "github.com/hashicorp/go-tfe"
"github.com/hashicorp/hcl/v2/hclsyntax"
"github.com/terramate-io/hcl/v2/hclsyntax"
"github.com/terramate-io/opentofulib/internal/backend"
"github.com/terramate-io/opentofulib/internal/configs"
"github.com/terramate-io/opentofulib/internal/states/statemgr"
Expand Down
2 changes: 1 addition & 1 deletion internal/cloud/cloud_variables.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
package cloud

import (
"github.com/hashicorp/hcl/v2/hclwrite"
"github.com/terramate-io/hcl/v2/hclwrite"
"github.com/terramate-io/opentofulib/internal/backend"
"github.com/terramate-io/opentofulib/internal/configs"
"github.com/terramate-io/opentofulib/internal/tfdiags"
Expand Down
2 changes: 1 addition & 1 deletion internal/cloud/cloud_variables_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"testing"

"github.com/google/go-cmp/cmp"
"github.com/hashicorp/hcl/v2"
"github.com/terramate-io/hcl/v2"
"github.com/terramate-io/opentofulib/internal/backend"
"github.com/terramate-io/opentofulib/internal/configs"
"github.com/terramate-io/opentofulib/internal/tfdiags"
Expand Down
4 changes: 2 additions & 2 deletions internal/command/arguments/extended.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"fmt"
"time"

"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/hcl/v2/hclsyntax"
"github.com/terramate-io/hcl/v2"
"github.com/terramate-io/hcl/v2/hclsyntax"

"github.com/terramate-io/opentofulib/internal/addrs"
"github.com/terramate-io/opentofulib/internal/plans"
Expand Down
4 changes: 2 additions & 2 deletions internal/command/console_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ package command
import (
"strings"

"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/hcl/v2/hclsyntax"
"github.com/terramate-io/hcl/v2"
"github.com/terramate-io/hcl/v2/hclsyntax"
)

type consoleBracketState struct {
Expand Down
6 changes: 3 additions & 3 deletions internal/command/fmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import (
"path/filepath"
"strings"

"github.com/hashicorp/hcl/v2"
"github.com/hashicorp/hcl/v2/hclsyntax"
"github.com/hashicorp/hcl/v2/hclwrite"
"github.com/mitchellh/cli"
"github.com/terramate-io/hcl/v2"
"github.com/terramate-io/hcl/v2/hclsyntax"
"github.com/terramate-io/hcl/v2/hclwrite"

"github.com/terramate-io/opentofulib/internal/configs"
"github.com/terramate-io/opentofulib/internal/tfdiags"
Expand Down
Loading

0 comments on commit b33a95f

Please sign in to comment.