Terratest 1.0.0 is the first stable release of the project. From this release forward, Terratest follows semantic versioning: breaking changes are restricted to major releases, and renamed or replaced symbols stay around as deprecated aliases in the v1 line. See the v1.0 announcement post for the narrative; the notes below cover what shipped.
✨ Highlights
- Context plumbing throughout. Every cloud-API helper now takes an explicit
context.Contextas its second argument.FooContext(fail-fast) andFooContextE(returns the error) are the canonical entrypoints; the bareFooandFooEforms remain as deprecated aliases. - Mockable SDK clients. Most Azure and GCP helpers that previously hid SDK client construction now ship with a
WithClientsibling that accepts an injected client. Drive Terratest against Azure'sazfakeserver or a GCP test double for fast unit tests with zero credentials. - Modern, supported underlying SDKs.
modules/azuremigrated off Microsoft's archived "track 1" SDK ontosdk/resourcemanager; AWS S3 helpers moved off the deprecateds3/managertos3/transfermanager. - Terragrunt v1.0 feature parity. The
terragruntmodule fully supports Terragrunt v1.0's CLI redesign with new wrappers and single-unit variants. Terragrunt-specific code is separated frommodules/terraforminto its own module. - Reliability fixes. EC2 list calls paginate, OPA policy downloads deduplicate, several panics on empty SDK responses are now errors.
⚠️ Breaking Changes
Azure SDK migration
modules/azure moved off the archived "track 1" Azure SDK onto the actively maintained sdk/resourcemanager. Users who import the underlying SDK directly need to update import paths, move field access under .Properties, and replace iterators with pagers. The release also dropped 8 deprecated Get*ClientE getters in favor of Create*ClientE, renamed 4 CreateNew*Client* factories (with deprecated aliases), fixed the NsgRuleSummary.SourceAdresssPrefixes typo, and changed GetVirtualMachineImage{,E} to return *VMImage. See the Azure migration guide for full mechanics.
AWS S3 uploader
The four NewS3Uploader* helpers now return *transfermanager.Client instead of *manager.Uploader. The call shape moves from uploader.Upload(ctx, &s3.PutObjectInput{...}) to client.UploadObject(ctx, &transfermanager.UploadObjectInput{...}). Types live under github.com/aws/aws-sdk-go-v2/feature/s3/transfermanager.
GCP Pub/Sub
modules/gcp/pubsub.go moved from cloud.google.com/go/pubsub v1 to v2. Wrapper shapes are unchanged, but callers driving the underlying client directly switch from client.Topic("name") / client.Subscription("name") handles to TopicAdminClient / SubscriptionAdminClient calls that take fully qualified resource names.
Terragrunt module split
Terragrunt-specific helpers were removed from modules/terraform/ and modules/test-structure/ in favor of the dedicated modules/terragrunt/ package: TgApplyAll, TgDestroyAll, TgPlanAllExitCode, ValidateInputs, InitAndValidateInputs, AssertTgPlanAllExitCode, TgInvalidBinary, TerragruntDefaultPath, ExtraArgs.ValidateInputs, NewTerragruntValidationOptions, and the TG constant. Terragrunt stack output keys were also renamed. See the terragrunt module migration table.
Kubernetes kubeconfig handling
GetKubernetesClientFromOptionsContextE now logs the kubeconfig load error before falling back to in-cluster authentication; previously the fallback was silent. A new KubectlOptions.InClusterAuth = true opt-in skips kubeconfig loading entirely for callers who want fully explicit auth.
testing.TestingT adoption
Helper signatures consistently take testing.TestingT (an interface) instead of the concrete *testing.T. Calls from *testing.T are unaffected; callers that wrap or substitute the test handle may need updates.
✨ New Features
WithClient injection helpers across Azure and GCP
Most Azure and GCP helpers now ship with a *WithClient sibling that accepts a pre-built SDK client, enabling unit testing against Azure's azfake server, GCP test doubles, and similar fakes without standing up real cloud resources or providing credentials.
Terragrunt v1.0 feature parity
All terraform-passthrough commands use terragrunt run -- <command> and multi-unit functions use terragrunt run --all -- <command>. Generic Run / RunE provide an escape hatch. New command wrappers: Render, RenderJSON, Graph, HclValidate, OutputAllJson, plus single-unit variants for Init, Plan, Apply, Destroy, Validate, and OutputJson.
GCP Pub/Sub helpers
AssertTopicExists and AssertSubscriptionExists added to modules/gcp/pubsub.go. Thanks to @Amit2465 for the contribution.
🔧 Code Quality & API Cleanup
- Godoc and
// Deprecated:annotations. A v1 documentation pass closed godoc gaps so the API surface renders cleanly on pkg.go.dev. Every renamed or replaced symbol carries a machine-readable// Deprecated:line sogo vet,staticcheck, and IDE LSPs surface upgrade guidance automatically. - Strict
golangci-lintv2 wired into pre-commit and CI across the project. interface{}→anysweep across the codebase.collectionsgenerics: functions are now generic;ListContainsis deprecated in favor ofslices.Contains.
🐛 Bug Fixes
- EC2 list pagination:
DescribeInstancesandDescribeTagsnow paginate; previously capped silently at 1,000 results. - Concurrent OPA download deduplication:
modules/opa/download_policy.gousessingleflightso concurrent calls for the samerulePathshare a single download. - Empty-response panics → errors: RDS, IAM, OCI list calls, and several Azure SDK-response paths return typed errors on empty responses where they previously panicked on unchecked slice access.
- ACM pagination: ACM list calls now paginate.
- OCI nil-safety:
ListVcnsand related calls loop onOpcNextPage; image sort handles nil timestamps; nil-pointer guards added across the package. - SSH file-handle leak:
SCPDirFromContextEcloses file handles on each download. - OPA cache concurrency race: cache initialization is now race-free under concurrent test runs.
- Azure NSG field name typo:
NsgRuleSummary.SourceAdresssPrefixesrenamed toSourceAddressPrefixes.
📦 Dependency Updates
- AWS SDK v2 bumped across every service used by Terratest;
s3/manager(deprecated) replaced withs3/transfermanager. - GCP SDKs current:
cloud.google.com/go/storage1.62,cloud.google.com/go/pubsub/v22.4,google.golang.org/api0.276. - Azure migrated off
azure-sdk-for-gov51 onto the actively maintainedsdk/resourcemanagermodules (compute, network, storage, keyvault, sql, servicebus, frontdoor, monitor, recoveryservices, and others). mitchellh/go-homedir(archived) removed as a direct dependency in favor ofos.UserHomeDir;denisenkom/go-mssqldbswapped for the Microsoft-maintained fork.google.golang.org/grpc1.80,github.com/docker/cli29.x,go.opentelemetry.io/otel/sdk1.43,github.com/jackc/pgx/v55.9.- OpenTofu pin updated to 1.11.6; Terragrunt baseline bumped to v1.0.2.
📖 Documentation Updates
- v1 migration guide covering breaking changes by service, with a dedicated Azure migration guide for the SDK move.
- Version pinning guide.
- README refreshed with stability and versioning policy;
SECURITY.mdadded.
⚙️ Process Updates
- All CI moved from CircleCI to GitHub Actions.
- Multi-arch (linux / darwin / windows × amd64 / arm64 / 386) build-and-release workflow with SHA256SUMS.
go-mod-tidy-checkworkflow added.
Full Changelog: v0.56.0...v1.0.0