remove more tfinstall references
diff --git a/README.md b/README.md index 69a0bb9..96582c3 100644 --- a/README.md +++ b/README.md
@@ -31,20 +31,21 @@ "log" "github.com/hashicorp/terraform-exec/tfexec" - "github.com/hashicorp/terraform-exec/tfinstall" + "github.com/hashicorp/hc-install/releases" + "github.com/hashicorp/hc-install/product" + "github.com/hashicorp/go-version" ) func main() { - tmpDir, err := ioutil.TempDir("", "tfinstall") - if err != nil { - log.Fatalf("error creating temp dir: %s", err) + installer := &releases.ExactVersion{ + Product: product.Terraform, + Version: version.Must(version.NewVersion("1.0.6")), } - defer os.RemoveAll(tmpDir) - execPath, err := tfinstall.Find(context.Background(), tfinstall.LatestVersion(tmpDir, false)) - if err != nil { - log.Fatalf("error locating Terraform binary: %s", err) - } + execPath, err := installer.Install(context.Background()) + if err != nil { + log.Fatalf("error installing Terraform: %s", err) + } workingDir := "/path/to/working/dir" tf, err := tfexec.NewTerraform(workingDir, execPath)
diff --git a/tfexec/internal/e2etest/doc.go b/tfexec/internal/e2etest/doc.go index 1a760ee..1d8811b 100644 --- a/tfexec/internal/e2etest/doc.go +++ b/tfexec/internal/e2etest/doc.go
@@ -1,6 +1,6 @@ // Package e2etest contains end-to-end acceptance tests for the tfexec // package. It aims to cover as many realistic use cases for tfexec as possible; -// to serve as a smoke test for the incidental usage of tfinstall with tfexec; +// to serve as a smoke test for the incidental usage of hc-install with tfexec; // and, eventually, to define the known and expected behaviour of the entire // Terraform CLI. // Test files inside the tfexec package are intended as unit tests covering the