Skip to content

Update module github.com/gruntwork-io/terratest to v1 - #1290

Closed
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/github.qkg1.top-gruntwork-io-terratest-1.x
Closed

Update module github.com/gruntwork-io/terratest to v1#1290
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/github.qkg1.top-gruntwork-io-terratest-1.x

Conversation

@renovate

@renovate renovate Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
github.com/gruntwork-io/terratest v0.54.0v1.0.1 age confidence

Release Notes

gruntwork-io/terratest (github.com/gruntwork-io/terratest)

v1.0.1

Compare Source

Highlights

This release starts the Terratest v1 maintenance phase. It is non-breaking and safe to upgrade to from any recent v1.x: nothing is removed or changed at runtime. The headline change is // Deprecated: annotations on the packages slated for removal in v2, each with inline guidance on the standard-library (or third-party) replacement.

Deprecated (removed in v2, not in this release):

  • modules/collections -> standard library slices
  • modules/environment -> os.Getenv at the call site
  • modules/git -> shell out to git with os/exec
  • modules/version-checker -> shell out to check a binary's version
  • modules/slack -> the github.com/slack-go/slack client directly

Each deprecated symbol's doc comment shows the concrete replacement.

v1 maintenance policy: security fixes only, delivered on the v1 branch, until 12 months after v2.0.0 reaches general availability. v2 ships under new /v2 module paths, so v1-pinned consumers are unaffected. This commit is the permanent v1 head; the long-lived v1 branch is cut from here. A v1-to-v2 import path map is included at docs/v2-import-map.md.

What's Changed

Full Changelog: gruntwork-io/terratest@v1.0.0...v1.0.1

v1.0.0

Compare Source

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.Context as its second argument. FooContext (fail-fast) and FooContextE (returns the error) are the canonical entrypoints; the bare Foo and FooE forms remain as deprecated aliases.
  • Mockable SDK clients. Most Azure and GCP helpers that previously hid SDK client construction now ship with a WithClient sibling that accepts an injected client. Drive Terratest against Azure's azfake server or a GCP test double for fast unit tests with zero credentials.
  • Modern, supported underlying SDKs. modules/azure migrated off Microsoft's archived "track 1" SDK onto sdk/resourcemanager; AWS S3 helpers moved off the deprecated s3/manager to s3/transfermanager.
  • Terragrunt v1.0 feature parity. The terragrunt module fully supports Terragrunt v1.0's CLI redesign with new wrappers and single-unit variants. Terragrunt-specific code is separated from modules/terraform into 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 so go vet, staticcheck, and IDE LSPs surface upgrade guidance automatically.
  • Strict golangci-lint v2 wired into pre-commit and CI across the project.
  • interface{}any sweep across the codebase.
  • collections generics: functions are now generic; ListContains is deprecated in favor of slices.Contains.

🐛 Bug Fixes

  • EC2 list pagination: DescribeInstances and DescribeTags now paginate; previously capped silently at 1,000 results.
  • Concurrent OPA download deduplication: modules/opa/download_policy.go uses singleflight so concurrent calls for the same rulePath share 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: ListVcns and related calls loop on OpcNextPage; image sort handles nil timestamps; nil-pointer guards added across the package.
  • SSH file-handle leak: SCPDirFromContextE closes 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.SourceAdresssPrefixes renamed to SourceAddressPrefixes.

📦 Dependency Updates

  • AWS SDK v2 bumped across every service used by Terratest; s3/manager (deprecated) replaced with s3/transfermanager.
  • GCP SDKs current: cloud.google.com/go/storage 1.62, cloud.google.com/go/pubsub/v2 2.4, google.golang.org/api 0.276.
  • Azure migrated off azure-sdk-for-go v51 onto the actively maintained sdk/resourcemanager modules (compute, network, storage, keyvault, sql, servicebus, frontdoor, monitor, recoveryservices, and others).
  • mitchellh/go-homedir (archived) removed as a direct dependency in favor of os.UserHomeDir; denisenkom/go-mssqldb swapped for the Microsoft-maintained fork.
  • google.golang.org/grpc 1.80, github.com/docker/cli 29.x, go.opentelemetry.io/otel/sdk 1.43, github.com/jackc/pgx/v5 5.9.
  • OpenTofu pin updated to 1.11.6; Terragrunt baseline bumped to v1.0.2.

📖 Documentation Updates

⚙️ 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-check workflow added.

Full Changelog: gruntwork-io/terratest@v0.56.0...v1.0.0

v0.56.0

Compare Source

✨ New Features

CreateJobFromCronJob and CreateJobFromCronJobE added.

The CreateJobFromCronJob and CreateJobFromCronJobE functions support creating Kubernetes cron jobs in a given namespace. This mirrors the behavior of the kubectl create job ... --from=cronjob/... command and provides a native way to trigger and test CronJob configurations within Terratest.

Special thanks to @​steffas for contributing this feature.

🐛 Bug Fixes

Preserve existing instance metadata in SetMetadata

Updates the newMetadata function to properly copy existing metadata items before applying new key-value pairs. This resolves an issue introduced in v0.55.0 where functions like SetMetadata and AddSshKey were accidentally overwriting all existing instance metadata instead of merging the new values.

Plan output parsing for Terraform 1.14+ fixed

Removes the trailing period requirement from the planWithChangesRegexp regular expression used by GetResourceCount. This resolves parsing failures caused by Terraform 1.14's new Actions feature, which appends additional text (e.g., . Actions: N to invoke.) to the standard plan summary line.

Update CronJob to use the batch/v1 API

Updates the CronJob implementation under the hood to use the stable batch/v1 API instead of batch/v1beta1. This restores compatibility with modern Kubernetes clusters, as the older v1beta1 API was completely removed in Kubernetes 1.25.

📖 Documentation Updates

Homepage examples for Terragrunt updated

Examples relevant to Terragrunt have been fixed in the https://terragrunt.gruntwork.io site.

⚙️ Process Updates

Golang bumped to 1.26

The version of Golang in go.mod has been updated to 1.26.

What's Changed

New Contributors

Full Changelog: gruntwork-io/terratest@v0.55.0...v0.56.0

v0.55.0

Compare Source

What's Changed

Full Changelog: gruntwork-io/terratest@v0.54.0...v0.55.0


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot added dependencies Pull requests that update a dependency file go Pull requests that update Go code labels Jul 14, 2026
@renovate

renovate Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

ℹ️ Artifact update notice

File name: go.mod

In order to perform the update(s) described in the table above, Renovate ran the go get command, which resulted in the following additional change(s):

  • 22 additional dependencies were updated

Details:

Package Change
filippo.io/edwards25519 v1.1.0 -> v1.1.1
github.com/aws/aws-sdk-go-v2 v1.41.9 -> v1.42.0
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.25 -> v1.4.29
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.25 -> v2.7.29
github.com/aws/aws-sdk-go-v2/service/acm v1.30.6 -> v1.38.2
github.com/aws/aws-sdk-go-v2/service/autoscaling v1.51.0 -> v1.66.1
github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.44.0 -> v1.69.1
github.com/aws/aws-sdk-go-v2/service/dynamodb v1.37.1 -> v1.57.2
github.com/aws/aws-sdk-go-v2/service/ecr v1.36.6 -> v1.57.1
github.com/aws/aws-sdk-go-v2/service/ecs v1.52.0 -> v1.78.1
github.com/aws/aws-sdk-go-v2/service/iam v1.38.1 -> v1.53.8
github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.10.5 -> v1.11.22
github.com/aws/aws-sdk-go-v2/service/kms v1.37.6 -> v1.50.5
github.com/aws/aws-sdk-go-v2/service/lambda v1.69.0 -> v1.89.1
github.com/aws/aws-sdk-go-v2/service/rds v1.91.0 -> v1.118.1
github.com/aws/aws-sdk-go-v2/service/route53 v1.46.2 -> v1.62.6
github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.34.6 -> v1.41.6
github.com/aws/aws-sdk-go-v2/service/sns v1.33.6 -> v1.39.16
github.com/aws/aws-sdk-go-v2/service/sqs v1.37.1 -> v1.42.26
github.com/aws/aws-sdk-go-v2/service/ssm v1.56.0 -> v1.68.5
github.com/aws/smithy-go v1.26.0 -> v1.27.1
github.com/jackc/pgx/v5 v5.7.1 -> v5.9.0

@renovate
renovate Bot force-pushed the renovate/github.qkg1.top-gruntwork-io-terratest-1.x branch 2 times, most recently from a52ae4d to 6a1860e Compare July 20, 2026 20:47
@renovate renovate Bot changed the title fix(deps): update module github.com/gruntwork-io/terratest to v1 fix(deps): update module github.com/gruntwork-io/terratest to v1 - autoclosed Jul 22, 2026
@renovate renovate Bot closed this Jul 22, 2026
@renovate
renovate Bot deleted the renovate/github.qkg1.top-gruntwork-io-terratest-1.x branch July 22, 2026 14:02
@renovate renovate Bot changed the title fix(deps): update module github.com/gruntwork-io/terratest to v1 - autoclosed fix(deps): update module github.com/gruntwork-io/terratest to v1 Jul 22, 2026
@renovate renovate Bot reopened this Jul 22, 2026
@renovate
renovate Bot force-pushed the renovate/github.qkg1.top-gruntwork-io-terratest-1.x branch 2 times, most recently from 6a1860e to d19a7eb Compare July 22, 2026 19:24
@renovate renovate Bot changed the title fix(deps): update module github.com/gruntwork-io/terratest to v1 Update module github.com/gruntwork-io/terratest to v1 Aug 7, 2026
@renovate
renovate Bot force-pushed the renovate/github.qkg1.top-gruntwork-io-terratest-1.x branch from d19a7eb to b4793c2 Compare August 12, 2026 00:40
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@renovate
renovate Bot force-pushed the renovate/github.qkg1.top-gruntwork-io-terratest-1.x branch from b4793c2 to f988f67 Compare August 14, 2026 20:15
@antoninbas

Copy link
Copy Markdown
Contributor

Closing in favor of #1356, which supersedes this.

This PR bumps terratest to v1, which keeps us on the single-module layout. In that layout modules/k8s imports modules/aws for one EC2 call, and modules/aws is a single flat package covering every AWS service, so importing modules/k8s pulls the entire AWS SDK into our graph — 36 aws-sdk-go-v2 entries in go.mod for code we never call.

Upstream has since fixed this. gruntwork-io/terratest#1877 broke the k8s -> aws edge, #1881 added CI gating so it cannot come back, and v2 splits terratest into per-package modules so we only pull what we use.

#1356 moves to the v2 modules (k8s/v2, helm/v2, httphelper/v2, core/v2/random) at v2.0.0-beta.2 instead. That drops the AWS SDK entirely and takes go.sum from 470 to 375 lines. It also picks up the API changes the v2 migration requires, which this PR does not need but which we would have had to do eventually anyway.

Note that the v2 modules are tagged per-module (modules/k8s/v2.0.0-beta.2 and so on), so Renovate will not track them as a continuation of this update.

@antoninbas antoninbas closed this Aug 15, 2026
@renovate

renovate Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor Author

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update. You will not get PRs for any future 1.x releases. But if you manually upgrade to 1.x then Renovate will re-enable minor and patch updates automatically.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.

antoninbas added a commit that referenced this pull request Aug 15, 2026
terratest v1 ships as a single module, and modules/k8s imported
modules/aws for one EC2 call, which pulled the entire AWS SDK into our
dependency graph: 36 aws-sdk-go-v2 entries in go.mod for code we never
call. terratest v2 splits the repo into per-package modules and drops
that edge, so depending on k8s no longer drags in the AWS SDK.

Switch the Helm e2e test to the v2 modules (k8s, helm, httphelper and
core/random) at v2.0.0-beta.2. This is a pre-release, which is
acceptable here because terratest is a test-only dependency that never
reaches a shipped binary.

The v2 API required a few call-site updates: the non-Context function
variants are gone, http-helper takes an options struct, and UniqueId
was renamed to UniqueID. In the Cleanup deleting the OIDC Secret we
pass context.Background(), since t.Context() is canceled just before
Cleanup functions run.

Also fix a pre-existing bug: the first two arguments to
NewKubectlOptions were swapped, so -kubeconfig and -context were wired
to the wrong fields. It went unnoticed because both flags default to
the empty string.

go.sum drops from 470 to 375 lines.

Supersedes #1290.

Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file go Pull requests that update Go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant