Status: FROZEN for import paths. The one open decision (renames) is resolved: the three hyphenated packages are renamed to idiomatic Go names at the /v2 boundary.
Some symbols also moved between modules during the beta. See Symbols relocated during the v2 beta.
Built from the actual v1 layout at tag v1.0.1-test (27 modules/ packages, 2 cmd/ binaries, 1 internal/lib tree).
Module base path: github.com/gruntwork-io/terratest
For any surviving import path, the rewrite is a prefix replacement that also applies to every subpackage:
modules/<name>/... -> modules/<name>/v2/... (the /v2 SIV goes after the module root; directory layout unchanged except for the three renames below)modules/<util>/... -> modules/core/v2/<util>/...http-helper -> httphelper, dns-helper -> dnshelper, test-structure -> teststructure. The package identifier loses its underscore too (http_helper -> httphelper), so call sites change, not just the import path. The codemod handles both.So e.g. modules/logger/parser -> modules/core/v2/logger/parser, modules/aws/foo -> modules/aws/v2/foo, and modules/http-helper -> modules/httphelper/v2.
modules/core/v2)| v1 import path | v2 import path |
|---|---|
modules/logger |
modules/core/v2/logger |
modules/testing |
modules/core/v2/testing |
modules/retry |
modules/core/v2/retry |
modules/random |
modules/core/v2/random |
modules/files |
modules/core/v2/files |
modules/shell |
modules/core/v2/shell |
/v2 submodules| v1 import path | v2 import path |
|---|---|
modules/aws |
modules/aws/v2 |
modules/azure |
modules/azure/v2 |
modules/gcp |
modules/gcp/v2 |
modules/k8s |
modules/k8s/v2 |
modules/helm |
modules/helm/v2 |
modules/ssh |
modules/ssh/v2 |
modules/docker |
modules/docker/v2 |
modules/packer |
modules/packer/v2 |
modules/database |
modules/database/v2 |
modules/opa |
modules/opa/v2 |
modules/terraform |
modules/terraform/v2 |
modules/terragrunt |
modules/terragrunt/v2 |
modules/http-helper |
modules/httphelper/v2 |
modules/dns-helper |
modules/dnshelper/v2 |
modules/test-structure |
modules/teststructure/v2 |
| v1 import path | replacement |
|---|---|
modules/collections |
stdlib slices |
modules/environment |
stdlib os.Getenv |
modules/git |
stdlib os/exec |
modules/slack |
none, vendor from frozen v1 if needed |
modules/version-checker |
none, shell out |
modules/oci |
none, Oracle Cloud support not carried forward; remains in frozen v1, vendor if needed |
cmd/pick-instance-type |
none, standalone binary, out of scope |
cmd/terratest_log_parser |
none, standalone binary (its logger/parser lib survives under modules/core/v2/logger/parser) |
| v1 | v2 |
|---|---|
internal/lib/formatting |
internal/formatting |
Moved to the module owning the type, so teststructure no longer requires aws, k8s, packer and ssh (#1877).
Signatures and on-disk filenames are unchanged, and every call site is a compile error.
| beta.1 | beta.2 onwards |
|---|---|
teststructure.{Save,Load}Ec2KeyPair |
aws.{Save,Load}Ec2KeyPair |
teststructure.{Save,Load}KubectlOptions |
k8s.{Save,Load}KubectlOptions |
teststructure.{Save,Load}PackerOptions |
packer.{Save,Load}PackerOptions |
teststructure.{Save,Load}SSHKeyPair |
ssh.{Save,Load}SSHKeyPair |
Nothing else moved. Watch for files that alias Terratest’s aws because plain aws is the AWS SDK.
Node addresses prefer ExternalIP (#1878). k8s.FindNodeHostnameContextE and GetServiceEndpoint (NodePort)
now return the Node’s ExternalIP when present, falling back to the internal hostname as before. On EKS that is the
public IP, so no EC2 call and no ec2:DescribeInstances permission is needed. Signatures are unchanged; the new
FindNodeHostnameWithOptionsContext[E] consults NodePublicIPLookup for clusters with no ExternalIP.
KubectlOptions carrying a RestConfig no longer serializes (#1879). MarshalJSON returns
k8s.ErrRestConfigNotSerializable instead of dropping the config. This already failed, with an opaque
json: unsupported type: transport.WrapperFunc. Use NewKubectlOptions or NewKubectlOptionsWithInClusterAuth.
27 modules/ packages = 6 collapsed into core + 15 standalone submodules + 6 removed. Plus 2 removed cmd/ binaries and 1 internal flatten. Submodule count: 16.
None. The map is frozen.
oci (Oracle Cloud Infrastructure): not carried forward to v2. Niche provider; removed alongside the other dropped packages. Oracle Cloud users stay on frozen v1.http-helper -> httphelper, dns-helper -> dnshelper, test-structure -> teststructure. Consumers already rewrite every import for the /v2 bump, so folding the rename into that same edit adds no separate migration, and it drops the non-idiomatic underscore package names (http_helper, currently suppressed with //nolint:staticcheck). The rename rides along with the modularization import rewrite, and the codemod covers both the path and the package identifier.