Releases: gruntwork-io/terratest
v1.0.0
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
v0.56.0
✨ 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
- feat(k8s): Add function to create job from cronjob by @steffsas in #1658
- chore: Onboarding Travis by @yhakbar in #1654
- fix: Fix SetMetadata to preserve existing GCP instance metadata by @james00012 in #1657
- fix: Fix plan output parsing for Terraform 1.14+ by @james00012 in #1661
- fix: Fix CronJob to use batch/v1 API instead of removed v1beta1 by @james00012 in #1662
- docs: Fixing website links by @yhakbar in #1666
- chore: Bump faraday from 1.0.1 to 2.14.1 in /docs by @dependabot[bot] in #1663
- chore: Bumping Go to
1.26by @yhakbar in #1667
New Contributors
Full Changelog: v0.55.0...v0.56.0
v0.55.0
What's Changed
- docs: add example for skipping test stages by @james00012 in #1629
- fix: remove satori/go.uuid dependency (CVE-2021-3538) by @james00012 in #1630
- Upgrade Go to 1.24.0 and update terragrunt module for CLI redesign by @james00012 in #1633
- Improve Terragrunt + Terratest documentation and deprecate Tg* functions by @james00012 in #1638
- Fix various bugs and cleanup deprecated code by @james00012 in #1646
- Fix GCP test failures by @james00012 in #1647
- Update bitnami/nginx chart version in helm tests by @james00012 in #1648
- Fix failing Kubernetes tests by @james00012 in #1650
- Fix CI test failures by @james00012 in #1651
- Upgrade Kubernetes client libraries to v0.35.0 by @james00012 in #1653
Full Changelog: v0.54.0...v0.55.0
v0.54.0
What's Changed
- Fix TerragruntArgs and TerraformArgs being ignored by @james00012 in #1617
- Simplify terragrunt function names by @james00012 in #1621
- Refactor: Extract formatting utilities to internal/lib by @james00012 in #1620
- Bump golang.org/x/crypto from 0.41.0 to 0.45.0 by @dependabot[bot] in #1625
- Add missing terragrunt commands: ValidateAll, RunAll, FormatAll, OutputListAll by @james00012 in #1622
- Upgrade terragrunt module tests to v0.93.10 by @james00012 in #1627
Full Changelog: v0.53.0...v0.54.0
v0.53.0
What's Changed
- Add independent Go modules for terragrunt and dependencies by @james00012 in #1608
- Bump github.com/ulikunitz/xz from 0.5.10 to 0.5.14 in /modules/terraform by @dependabot[bot] in #1611
- Revert PR #1608: Revert modularization changes by @james00012 in #1614
- Fix typo in docs for
InitAndValidateInputsE()by @particleflux in #1616
Full Changelog: v0.52.0...v0.53.0
v0.52.0
What's Changed
- feat: Add SSH certificate authentication support for Terratest by @james00012 in #1594
- Update golang.org/x/tools to v0.36.0 for Go 1.25+ compatibility by @james00012 in #1593
- fix: prevent segfault in helm.UnmarshalK8SYaml with empty YAML documents by @james00012 in #1597
- Add ExecPod functions to execute commands in Kubernetes pods by @james00012 in #1599
- Add terragrunt run-all helpers and refactor helm module by @james00012 in #1601
- docs: add helm as an entry to package table by @Sacquer in #1604
- Ensuring that multiple dummy servers can use the same handlers by @Malhavok in #1603
- Fix order of ExtraArgs for Output command with non-empty key (fixes #1606) by @dee-kryvenko in #1607
New Contributors
Full Changelog: v0.51.0...v0.52.0
v0.51.0
What's Changed
- Support for
terragrunt stack generateby @james00012 in #1562 - Implement terragrunt stack run support by @james00012 in #1563
- Fixing failing tests and refactoring terragrunt modules for consistency by @james00012 in #1566
- chore(k8s): replace http-echo image and update Deployment for compatibility by @james00012 in #1567
- Refactor terragrunt module and add dedicated test pipeline by @james00012 in #1569
- Implement support for terragrunt stack output command by @james00012 in #1570
- Bump golang.org/x/oauth2 from 0.24.0 to 0.27.0 by @dependabot[bot] in #1572
- Bump nokogiri from 1.18.8 to 1.18.9 in /docs by @dependabot[bot] in #1574
- Fix broken terragrunt stack output functionality and tests by @james00012 in #1578
- feat: Add stdin support for terragrunt run command by @james00012 in #1580
- feat(terragrunt): Separate terragrunt and terraform arguments by @james00012 in #1581
- feat: Add terragrunt stack clean command and improve module by @james00012 in #1582
- feat: Add support for custom OPA command line arguments by @james00012 in #1576
- Bump github.com/ulikunitz/xz from 0.5.10 to 0.5.14 by @dependabot[bot] in #1585
- Upgrade Kubernetes client libraries by @james00012 in #1590
- Bump rexml from 3.3.9 to 3.4.2 in /docs by @dependabot[bot] in #1592
Full Changelog: v0.50.0...v0.51.0
v0.50.0
What's Changed
- add cronjob by @james03160927 in #1553
- fix ResourceGroupExists by @james03160927 in #1552
- allow GOOGLE_OAUTH_ACCESS_TOKEN by @james03160927 in #1555
- Adjust warning patterns by @james03160927 in #1550
- chore: Offboarding Levko by @yhakbar in #1558
- fix: Respect port selection by name by services in ForwardPortE by @s-diez in #1557
- fix: Helm example deployment test by @james03160927 in #1559
- Updated the subnet struct and corresponding function to fetch the subnet CIDR range by @Atchuthmullapudi in #1561
- Implement support for
terragrunt stack initby @james03160927 in #1560
New Contributors
- @Atchuthmullapudi made their first contribution in #1561
Full Changelog: v0.49.0...v0.50.0
v0.49.0
Modules affected
terraformhelmazureawsk8sloggerpacker
What's Changed
- feat: Creating a test for TF_LOG by @james03160927 in #1512
- feat: handle multiple yaml doc by @james03160927 in #1514
- feat: use the new sdk for azure resource group by @james03160927 in #1511
- feat: Stop DynamoDB methods with E Failing Immediately by @robmorgan in #1507
- feat: Get and Put for ECR repo policies by @felixfriedrich in #1519
- feat: include --version in helm upgrade by @jijiechen in #1532
- feat: add mixed vars support by @james03160927 in #1517
- feat: Add helper function for parsing packer-manifest.json by @james03160927 in #1546
- feat: Support a s3:putobject by @james03160927 in #1525
- feat: capture terraform stdout stderr and exitcode separately by @james03160927 in #1530
- feat: add UnmarshalK8SYamlsE by @james03160927 in #1533
- feat: add support for extra arguments by @james03160927 in #1523
- feat: allow --backend-config to use file path by setting the value to nil by @james03160927 in #1539
- feat: Support for ListNamespaces function by @james03160927 in #1543
- feat: K8S fix forward to service port by @james03160927 in #1547
- fix: add test for duplicate key by @james03160927 in #1518
- fix: support custom TG logger settings by @bt-macole in #1509
- docs: Improve README for terraform database example module by @james03160927 in #1515
- chore: adjust fixture to fix broken tests by @james03160927 in #1548
- chore: add RenderTemplateAndGetStdOutErrE & RunHelmCommandAndGetStdOutErrE by @james03160927 in #1526
- chore: Update parseListOfMaps to handle non-map data structures by @james03160927 in #1529
- chore: add test for literal block by @james03160927 in #1535
- chore: Update CODEOWNERS by @james03160927 in #1554
- chore: Adding Terragrunt team to CODEOWNERS by @yhakbar in #1513
- chore(deps): Bump nokogiri from 1.16.5 to 1.18.3 in /docs by @dependabot in #1516
- chore(deps): Bump github.com/golang-jwt/jwt/v5 from 5.2.1 to 5.2.2 by @dependabot in #1527
- chore(deps): Bump golang.org/x/crypto from 0.32.0 to 0.35.0 by @dependabot in #1541
- chore(deps): Bump golang.org/x/net from 0.34.0 to 0.38.0 by @dependabot in #1542
- chore(deps): Bump nokogiri from 1.18.3 to 1.18.8 in /docs by @dependabot in #1545
New Contributors
- @felixfriedrich made their first contribution in #1519
- @jijiechen made their first contribution in #1532
Full Changelog: v0.48.2...v0.49.0
v0.48.2
Modules affected
shellawsgcpterraformk8sazuredatabase
What's Changed
- feat: Add
RunCommandAndGetStdOutErrby @james03160927 - feat: Implement functionality for
S3BucketServerSideEncryptionby @james03160927 - feat: Add an import SSH key for a specific project by @james03160927
- feat: Do not merge
stderrintostdoutby @g7r - feat: Add bucket ownership control by @james03160927
- feat: Add
request-timeoutoptions forkubectlby @james03160927 - feat: Support pagination for
GetAllParametersOfRdsInstanceby @james03160927 - feat: Add support for Azure container apps by @tjololo
- chore(deps): Bump
golang.org/x/cryptofrom 0.29.0 to 0.31.0 by @dependabot - feat: Add support for databases by @james03160927
- chore(deps): Bump
golang.org/x/netfrom 0.31.0 to 0.33.0 by @dependabot - feat: Add a new check for private DNS zones by @johannes-engler-mw
- chore: Update copyright year in README by @ofek
- fix: Use
HasSuffixto check for suffixes by @amangale
New Contributors
- @g7r made their first contribution in #1495
- @tjololo made their first contribution in #1493
- @johannes-engler-mw made their first contribution in #1455
- @ofek made their first contribution in #1506
- @amangale made their first contribution in #1505
Full Changelog: v0.48.1...v0.48.2