Pin Terratest if you need reproducible test builds and deliberate control over when you adopt a new release.
From the directory that contains your test module’s go.mod:
go get github.com/gruntwork-io/terratest@v0.56.0
go mod tidy
Replace v0.56.0 with the tag you want from the Releases page. The same command upgrades, downgrades, or reverts the pin. Always commit go.mod and go.sum so the pin travels with your code; avoid @latest if you need reproducibility.
go get, not subpath requiresgo get github.com/gruntwork-io/terratest@<tag> is enough; the pin applies to every subpackage your tests import. Avoid writing subpath requires by hand (e.g. go mod edit -require github.com/gruntwork-io/terratest/modules/terraform@<tag>); Go searches for a modules/terraform/<tag> tag and fails with unknown revision.
Your entire infrastructure. Defined as code. In about a day.
Explore Gruntwork.io