github gruntwork-io/terratest v0.56.0

one day ago

✨ 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: v0.55.0...v0.56.0

Don't miss a new terratest release

NewReleases is sending notifications on new releases.