Skip to content

Commit 71137c9

Browse files
committed
v2 modularization: relocate shared internal helpers into core/v2
internal/collections and internal/lib/formatting were reached by 6 submodules (aws, azure, gcp, teststructure, terraform, terragrunt) across module boundaries, which only works under go.work and would fail standalone/release builds (a v2 submodule must not depend on the frozen v1 root module). Move them to modules/core/v2/collections and modules/core/v2/formatting (core is a universal dependency); also flattens internal/lib/formatting per the RFC. Root internal/ is now empty and removed.
1 parent 0e95162 commit 71137c9

10 files changed

Lines changed: 8 additions & 8 deletions

File tree

modules/aws/region.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"github.com/aws/aws-sdk-go-v2/aws"
99
"github.com/aws/aws-sdk-go-v2/service/ec2"
1010
"github.com/aws/aws-sdk-go-v2/service/ssm"
11-
"github.com/gruntwork-io/terratest/internal/collections"
11+
"github.com/gruntwork-io/terratest/modules/core/v2/collections"
1212
"github.com/gruntwork-io/terratest/modules/core/v2/logger"
1313
"github.com/gruntwork-io/terratest/modules/core/v2/random"
1414
"github.com/gruntwork-io/terratest/modules/core/v2/testing"

modules/azure/region.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package azure
33
import (
44
"context"
55

6-
"github.com/gruntwork-io/terratest/internal/collections"
6+
"github.com/gruntwork-io/terratest/modules/core/v2/collections"
77
"github.com/gruntwork-io/terratest/modules/core/v2/random"
88
"github.com/gruntwork-io/terratest/modules/core/v2/testing"
99
"github.com/stretchr/testify/require"

internal/collections/collections_test.go renamed to modules/core/collections/collections_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"fmt"
55
"testing"
66

7-
"github.com/gruntwork-io/terratest/internal/collections"
7+
"github.com/gruntwork-io/terratest/modules/core/v2/collections"
88
"github.com/stretchr/testify/assert"
99
)
1010

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package formatting_test
33
import (
44
"testing"
55

6-
"github.com/gruntwork-io/terratest/internal/lib/formatting"
6+
"github.com/gruntwork-io/terratest/modules/core/v2/formatting"
77
"github.com/stretchr/testify/assert"
88
)
99

modules/gcp/region.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"os"
66
"strings"
77

8-
"github.com/gruntwork-io/terratest/internal/collections"
8+
"github.com/gruntwork-io/terratest/modules/core/v2/collections"
99
"github.com/gruntwork-io/terratest/modules/core/v2/logger"
1010
"github.com/gruntwork-io/terratest/modules/core/v2/random"
1111
"github.com/gruntwork-io/terratest/modules/core/v2/testing"

modules/terraform/format.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"strconv"
88
"strings"
99

10-
"github.com/gruntwork-io/terratest/internal/lib/formatting"
10+
"github.com/gruntwork-io/terratest/modules/core/v2/formatting"
1111
)
1212

1313
// TerraformCommandsWithLockSupport is a list of all the Terraform commands that

modules/terragrunt/init.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package terragrunt
33
import (
44
"context"
55

6-
"github.com/gruntwork-io/terratest/internal/lib/formatting"
6+
"github.com/gruntwork-io/terratest/modules/core/v2/formatting"
77
"github.com/gruntwork-io/terratest/modules/core/v2/testing"
88
"github.com/stretchr/testify/require"
99
)

modules/teststructure/validate_struct.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"path/filepath"
77

88
go_commons_collections "github.com/gruntwork-io/go-commons/collections"
9-
"github.com/gruntwork-io/terratest/internal/collections"
9+
"github.com/gruntwork-io/terratest/modules/core/v2/collections"
1010
"github.com/gruntwork-io/terratest/modules/core/v2/files"
1111
"github.com/mattn/go-zglob"
1212
)

0 commit comments

Comments
 (0)